对于非纯字符串组成的列表,需要使用map(str, 列表)转换,纯字符串组成的列表则不需要转换 list1 = [1, 2, 3, 4, 5]c = ','.join(map(str,list1))print(c)print(type(c))list2 = ['1', '2', '3', '4', '5']d = ','.join(list2)print(d)print(type(d)) 来源:https://www.cnblogs.com/WebLinuxStudy/p/11954315.html 标签 python列表 python字符串 python