no message
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
a=input("请输入您的年龄")
|
||||
print(eval(a),type(a),type(eval('11')))
|
||||
print(eval(a),type(a),type(eval(a)))
|
||||
# type(a) 等价于 type('88'),即返回值为:<class 'str'>
|
||||
# eval() 不是"取值",而是"把字符串当代码跑"
|
||||
print("--------------")
|
||||
b="北京欢迎您!"
|
||||
print(eval('b'),type(eval('b')))
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
bol1 = "hello"
|
||||
print(eval(bol1))
|
||||
Reference in New Issue
Block a user