本文介绍了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()或".".join() ..因此,任何字符串 instance 都具有方法join()
'.'.join() or ".".join().. So any string instance has the method join()
更多推荐
Python 3 string.join()等效吗?
发布评论