在python中使用builtins方法查看內置函数,具体方法如下:
import builtinsnum = len(dir(builtins))print("此版本Python拥有"+str(num)+"个函数:")j = 0for i in dir(builtins):j=j+1print(str(j)+"."+i)
import builtins
num = len(dir(builtins))
print("此版本Python拥有"+str(num)+"个函数:")
j = 0
for i in dir(builtins):
j=j+1
print(str(j)+"."+i)