Python list和str互转

字符串转list

a = "HelloWorld"

b=list(a)

print(type(b))

list转字符串:

c="".join(b)

print(type(c))

猜你喜欢

转载自blog.csdn.net/qq_18287147/article/details/106082390