标签: python python-2.7
如何通过python eval方法计算字符串类实例方法的字符串表示名称 例如
eval
f=eval(raw_input())
输入: 上
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<string>", line 1, in <module> NameError: name 'upper' is not defined