list==》str
list1=['two','three']
print(''.join(list1))# list 包含int 的话这个就不能使用 =>twothree
list2=['two',222,'three']
print(''.join([str(i) for i in list2]))# list 包含int 的话这个就不能使用 => two222three
mystr='asdfasdfasdfasdfs'
list1 = list(mystr)
print(list1)# ['a', 's', 'd', 'f', 'a', 's', 'd', 'f', 'a', 's', 'd', 'f', 'a', 's', 'd', 'f', 's']
网友评论