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

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

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

posted @ 2018-01-06 11:42  icon_haru  阅读(8955)  评论(1)    收藏  举报