globals()、局部变量()和vars()之间有什么区别?.之间的区别是什么?globals(), locals(),和vars()?他们回来了什么?更新结果有用吗?
3 回答

开满天机
TA贡献1786条经验 获得超13个赞
vars()
locals()
eval()
def test(): huh = locals(); huh['d'] = 4; print eval('d')
test()
添加回答
举报
0/150
提交
取消