字符串和列表互相转换 1、字符串转为列表 str1 = 'a1b2' ls1 = [str(i) for i in str1] 2、列表转为字符串 ls2 = ['1','a','2','b'] str2 = ''.join(ls2)