import keyword print(keyword.kwlist)
['False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']
as assert from global in is lambda nonlocal pass with yield import def del class return while continue break for if elif else and or not False None True try except finally raise
mystr = input("请输入数据") print(mystr)
import os cmd = input("cmd:") os.system(cmd)
name='yasepix' print(type(name)) print(id(name))
num=111 print(type(num)) num=11111111111111111111111111111111111111111111111 print(type(num)) 结果为: <class 'int'> <class 'int'>
R=input("r:") print(R) print(type(R)) R=eval(R) print(type(R)) print(R*R*3.14159265357979) ############################ r:2 2 <class 'str'> <class 'int'> 12.56637061431916