in the example, shouldn’t the term be value and not key?
from what i understand, it is like that in a dictionary:
Dictionary= { KEY: VALUE }
or are the two terms interchangeable? Thanks
in the example, shouldn’t the term be value and not key?
from what i understand, it is like that in a dictionary:
Dictionary= { KEY: VALUE }
or are the two terms interchangeable? Thanks
this one:
# A simple dictionary
d = {"foo" : "bar"}
for key in d:
print d[key] # prints "bar"
?
All the terms are fine, we can loop over the dictionary, which gives use the keys, then we can use the key to get the value