原文:argument 1 must be 2-item sequence, not int

看了https: blog.csdn.net qq article details 的說明,才明白為什么錯了。 當使用Python pygame時出現TypeError: argument must be item sequence, not int提示 原始代碼: screen pygame.display.set mode SCREEN WIDTH,SCREEN HEIGHT 應改為: scr ...

2019-03-17 08:38 0 1069 推薦指數:

查看詳情

python中出現TypeError: write() argument must be str, not int(list、tuple、dict等)

TypeError: write() argument must be str, not int 出現如上錯誤的原因是寫入文件里的必須是字符串形式,其他形式不行,因此如果列表、元組、字典等需要寫入文件時事先應該str類型轉化(拓展,將列表、元組、字典轉為字符串使用str,將字符串逆轉化使用eval ...

Mon Jul 20 16:55:00 CST 2020 0 4056
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM