本文介绍了Python 3 string.join() 等效吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在 python 2 中使用 string.join() 方法,但它似乎已在 python 3 中删除.python 3 中的等效方法是什么?
I've been using string.join() method in python 2 but it seems like it has been removed in python 3. What is the equivalent method in python 3?
string.join() 方法让我将多个字符串组合在一起,并在每个其他字符串之间使用一个字符串.例如, string.join(("a", "b", "c"), ".") 将产生 "a.b.c".
string.join() method let me combine multiple strings together with a string in between every other string. For example, string.join(("a", "b", "c"), ".") would result "a.b.c".
推荐答案'.'.join() or ".".join().. 所以任何string instance 有方法 join()
'.'.join() or ".".join().. So any string instance has the method join()
更多推荐
Python 3 string.join() 等效吗?
发布评论