def exec(*args, **kwargs): # real signature unknown
"""
Execute the given source in the context of globals and locals.
The source may be a string representing one or more Python statements
or a code object as returned by compile().
The globals must be a dictionary and locals can be any mapping,
defaulting to the current globals and locals.
If only globals is given, locals defaults to it.
"""
pass
a=10
#exec("a+=10",{"a": 30})
exec("a+=10",None)#这样写,a是全局?还是局部变量?为什么?
print(a)
a=10
exec("a+=10",{"a": 30})# 这样写,a是全局?还是局部变量?为什么?
#exec("a+=10",None)
print(a)
--
FROM 120.242.240.*