原文:[已解決]報錯: TypeError: sequence item 0: expected str instance, int found

今天敲小例子,報了錯TypeError: sequence item : expected str instance, int found 小例子 以為會打印 two three 結果報了錯 上網查了資料,說list包含數字,不能直接轉化成字符串。 解決辦法: 即遍歷list的元素,把他轉化成字符串。這樣就能成功輸出 two three 結果了。 from: https: blog.csdn.ne ...

2020-06-07 22:33 0 3211 推薦指數:

查看詳情

 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM