001、
>>> test1 = ["aaa", 100, 200] >>> test1 ['aaa', 100, 200] >>> test2 = [str(k) for k in test1] ## 将列表test1中的数值转换为字符串 >>> test2 ['aaa', '100', '200']
002、
>>> test1 = ("aaa", 100, 200) >>> test1 ('aaa', 100, 200) >>> test2 = [str(k) for k in test1] ## 同样适用于元组 >>> test2 ['aaa', '100', '200'] >>> tuple(test2) ('aaa', '100', '200')