>>> import sys
>>> setattr(sys.modules[__name__], 'x', 5)
>>> setattr(sys.modules[__name__], 'y', 10)
>>> x
5
>>> y
10
>>> vars()['z'] = 10
>>> z
10
>>> globals()['n'] = 80
>>> n
80
>>> exec('xyz="xyz"')
>>> xyz
'xyz'
>>> exec('{s}="{s}"'.format(s='xyz'))
>>> xyz
'xyz'