python中将字符串转化为本地变量

var = 123445
s= locals()['var']
s2=vars()['var']

print s,s2

原文地址:https://www.cnblogs.com/liguangxu/p/5374548.html