首页 > 代码库 > string和list互转

string和list互转

 1 import string 2 str = abcde 3  list = list(str) 4 list 5 [a, b, c, d, e] 6 str 7 abcde 8 str_convert = ‘‘.join(list) 9 str_convert10 abcde

 

string和list互转