python----string join() use

Concatenate any number of strings.

The string on which the method is called is inserted between each given string.
The result is returned as a new string ( remember it must be of type str )

a = ['1','2','3']

c = ','.join(a)
print(c)

# 输出的结果为
1,2,3

 

Guess you like

Origin blog.csdn.net/zhang_8626/article/details/95480047