Python常见错误(1)
来源:互联网 发布:跟奥巴马一起编程 15 编辑:程序博客网 时间:2024/06/01 10:32
1. 变量覆盖,导致出错
str = 'hello'tmp = ''for s in str: tmp += ord(str(s))print(tmp)
显示错误: TypeError: 'str' object is not callable
问题在于第一行,习惯性命名变量为str,将python的关键字str覆盖了。
0 0
- Python常见错误(1)
- Python 常见错误(雷区)
- Python常见错误和异常(4)
- python常见错误总结(未完结)
- python初学者常见错误
- python常见错误
- Python常见错误,原因
- Python入门常见错误
- python开发常见错误
- Python常见错误汇总
- Python常见错误
- Python常见错误归纳
- Python 常见错误
- python新手常见错误
- python常见错误
- python常见错误类型
- 常见Python运行错误
- python常见错误集合
- js字符串的分割
- 使用 Haraka 搭建邮件发送服务器
- HashSet和TreeSet有什么区别?
- oracle如何把一个dmp数据库备份还原成空库,并清理表空间
- Day2 - Wanan 么么哒。
- Python常见错误(1)
- Java内部类详解
- loadrunner
- maven构建命令,maven本地工厂的创建,maven骨架的生成,以及在eclipse里创建maven工程
- this is my first blog on csdn!
- Android 获取剩余的内存 和SD卡的容量
- python进阶必读汇总
- struts中利用jquery的$.ajax方法来动态获得图片以及信息
- 浅谈Java中的深拷贝和浅拷贝(转载)