递归 递归: # 函数在调用阶段直接或间接地又调用了自身 应用场景: # 将列表中的数字依次打印出来(循环的层数是你必须要考虑的点) --> l = [1, [2, [3, [4, [5, [6, [7, [8, [9, [10, [11, [12, [13, ]]]]]]]]]]]]] # 循环的写法, 列表嵌套越多层越麻烦 for i in l: # 推导思路 if type(i) is int: print(i) else: for item in i: if type(item)…
Python3内置函数 https://www.runoob.com/python3/python3-built-in-functions.html int https://www.runoob.com/python3/python3-number.html str https://www.runoob.com/python3/python3-string.html list https://www.runoob.com/python3/python3-list.html tuple https…
经常调用的时候不知道python当前版本的内置函数是哪些,可以用下面的指令查看: C:\Users\Administrator>python Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC v.1500 32 bit ( Intel)] on win32 Type "help", "copyright", "credits" or "license&q…