example:
dic = {'a': 'b', 'c': 'd'}
for x, y in dic:
print(x,y)
would ideally return
a b
but it throws an error instead. so, is there any alternative to doing this:
for x in dic:
y = dic[x]
example:
dic = {'a': 'b', 'c': 'd'}
for x, y in dic:
print(x,y)
would ideally return
a b
but it throws an error instead. so, is there any alternative to doing this:
for x in dic:
y = dic[x]