原文: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