Python
林夕水心2
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python删除空白只是暂时性的,若要永久,必须存回变量
原创 2019-09-17 21:39:30 · 268 阅读 · 0 评论 -
加str()函数可避免类型错误问题
print(‘今晚,我邀请了’+len(names)+‘位嘉宾’) Traceback (most recent call last): File “<pyshell#197>”, line 1, in print(‘今晚,我邀请了’+len(names)+‘位嘉宾’) TypeError: can only concatenate str (not “int”) to str...原创 2019-09-23 21:30:00 · 370 阅读 · 0 评论 -
python复制列表——切片法
python复制列表——切片法 用切片法复制列表,以备用是个容易遗忘的技巧。 friend_foods = my_foods[:] 结合函数时: print_models(unprinted_designs[:],completed_models)原创 2019-10-09 20:53:50 · 472 阅读 · 0 评论 -
python谨记大小写出错
AttributeError: ‘ElectricCar’ object has no attribute ‘battery’ Battery大小写不一致。原创 2019-10-11 15:55:01 · 484 阅读 · 0 评论
分享