1、一篇文章让你彻底搞清楚Python中self的含义
Python中self用法详解 https://blog.youkuaiyun.com/CLHugh/article/details/75000104
Python中self的含义 https://blog.youkuaiyun.com/daocaoren1543169565/article/details/80626035
Python self参数 & 函数详解 https://blog.youkuaiyun.com/bing900713/article/details/60884931
2、Python中0.3怎么转二进制 https://baijiahao.baidu.com/s?id=1621796338461254255&wfr=spider&for=pc
Python hex() 函数 https://www.runoob.com/python/python-func-hex.html
转换为二进制函数:bin( )
转换为八进制函数:oct( )
转换为十进制函数:int( )
转换为十六进制函数:hex( )
我们把0.3转换成二进制数据吧,我们就用一下内置函数,在Python IDLE中bin(0.3)
bin(0.3)
杨辉三角(生成器generator) https://www.cnblogs.com/meitian/p/4730841.html
https://www.liaoxuefeng.com/wiki/1016959663602400/1017318207388128#0
3、python * 与 ** https://www.cnblogs.com/omg-hxy/p/9081177.html
pow() 函数 https://www.runoob.com/python3/python3-func-number-pow.html
Python3 * 和 ** 运算符 https://blog.youkuaiyun.com/yilovexing/article/details/80577510
4、python – lambda表达式 https://www.cnblogs.com/hf8051/p/8085424.html
Python中的 // 与 / 的区别 https://blog.youkuaiyun.com/DATA8866/article/details/62884210
5、python 中 关于reverse() 和 reversed()的用法介绍https://blog.youkuaiyun.com/gymaisyl/article/details/83785853
6、print和pprint两者的区别 https://blog.youkuaiyun.com/qq_24185239/article/details/80977556
7、python 中的[:-1]和[::-1]https://blog.youkuaiyun.com/mingyuli/article/details/81604795
8、
li = [1,1,2,3,4,5,6,7,8,9]
for i in li:
if i%2 != 0:
li.remove(i)
print(i)
print(li)
print(li)
结果
1
[1, 2, 3, 4, 5, 6, 7, 8, 9]
[1, 2, 3, 4, 5, 6, 7, 8, 9]
3
[1, 2, 4, 5, 6, 7, 8, 9]
5
[1, 2, 4, 6, 7, 8, 9]
7
[1, 2, 4, 6, 8, 9]
9
[1, 2, 4, 6, 8]
[1, 2, 4, 6, 8]