- 博客(2)
- 收藏
- 关注
原创 《自学是门手艺》Part.1.E.5.字符串的操作、函数与Methods
Python 针对数字常用的操作符和内建函数,按照优先级从低到高排列:名称 操作 结果 官方文档链接加 1 + 2 3 减 2 - 1 1 乘 3 * 5 15 除 6 / 2 3.0 商 7 // 3 2 余 7 % 3 1 负 -6 -6 正 +6 6 绝对值 abs(-1) 1 abs()转换为整数 int(3.14) 3 int()转换为浮点数 fl...
2019-09-15 16:21:50
131
原创 《自学是门手艺》Part.1.E.7 找到英文字母数值之和等于100的字母
学习笔记:读取文件时,必须写完整的文件所在路径,才能open file.txt文件需要另存为UTF-8格式。with open('Desktop/english-words-master/english-words-master/words_alpha.txt', 'r') as file: for word in file.readlines(): p...
2019-09-15 16:09:56
8644
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人