Python—HeadFirst—笔记(1)
来源:互联网 发布:天涯全自动营销软件 编辑:程序博客网 时间:2024/05/22 02:02
1.Python中错误:'builtin_function_or_method' object has no attribute 'split'
原因:调用strip方法未加()
解决方法:将代码james=data.strip.split(',')改为james=data.strip().split(',')
2.排序
(1)原地排序:sort()
(2)复制排序:sorted() BIF
3.list comprehension
将上述代码用列表推倒可简化为:new_mikey=[sanitize(each_t) for each_t in mikey]
0 0
- Python—HeadFirst—笔记(1)
- headfirst python 学习笔记
- HeadFirst 设计模式阅读笔记(一)—— strategy
- HeadFirst 设计模式笔记(二)—— observer
- HeadFirst 设计模式笔记(三)—— decorator
- HeadFirst 设计模式笔记(四)—— 工厂模式
- HeadFirst 设计模式笔记(六)—— 命令模式
- HeadFirst 设计模式笔记(四)—— 工厂模式
- 策略模式——HeadFirst学习笔记
- HeadFirst Python——在windows下学习Python
- HeadFirst 设计模式笔记(五)—— 单例模式
- HeadFirst 设计模式笔记(七)—— 适配器模式与外观模式
- HeadFirst设计模式学习笔记10——组合模式
- HeadFirst 设计模式学习笔记11——状态模式
- HeadFirst 设计模式学习笔记12——代理模式
- HeadFirst 设计模式学习笔记14——MVC分析
- HeadFirst 设计模式学习笔记10——MVC分析
- 《HeadFirst设计模式》学习笔记——策略模式
- Let us learn C in Code <5>_printf()_function
- 初级学习JSP总结
- 面试中的二叉树(附相关函数)
- 栈的压入、弹出序列和栈所有可能的弹出顺序
- 关于工作效率的心得分享
- Python—HeadFirst—笔记(1)
- 九度题目1069:查找学生信息
- 《ios零基础教程》 ----for循环、函数 2014-3-23总结
- Cache 写操作策略
- android基础入门ImageSwitcher视图(11)
- Python 匹配字符积累
- 在线看kernel代码
- Can not issue data manipulation statements with executeQuery().
- jersey -rs client使用