python list转换字符串报错TypeError: sequence item 0: expected str instance, int found

list包含数字,不能直接转化成字符串。

解决办法:print(" ".join('%s' %id for id in list1))

posted @ 2020-12-22 17:35  史可轩  阅读(173)  评论(0编辑  收藏  举报
3 4