If use following code to print globals() key value pairs one by one:
for k, v in globals().items():
# dict(globals()) working
print(k, v)
will get such runtime error:
RuntimeError: dictionary changed size during iteration
I know dict(globals()) can freeze the dict, so no issue.
But I'm a little curious what actually changed during iteration? Is the exectuing function it self?