program1.py: a = "this is a test"
for x in a:
print(x)
program2.py: a = """this is a test
with more than one line
three, to be exact"""
for x in a:
print(x)
program3.py: im
我(試圖)在我的程序中使用globals()來迭代所有全局變量。這是我去一下吧: for k, v in globals().iteritems():
function(k, v)
當然,在這樣做時,我剛剛創建2個全局變量,k和v。所以,我得到這個異常: RuntimeError: dictionary changed size during iteration
而且,這裏是在解