Is it considered 'defined behavior' to add a new key value pair to the globals() dictionary in python?

后端 未结 0 595
生来不讨喜
生来不讨喜 2020-12-10 01:38

If I do this in python 3.8.3 it works:

globals()[\'any_new_variable_name\'] = \'any_value_or_object_here\'
print(any_new_variable_name)

It wo

相关标签:
回答
  • 消灭零回复
提交回复
热议问题