examples/dictionary/loop_items.py
from __future__ import print_function
 
user = {
    'fname': 'Foo',
    'lname': 'Bar',
}

for t in user.items():      #  returns tuples
    print("{} -> {}".format(t[0], t[1]))
    #print("{} -> {}".format(*t))

# lname -> Bar
# fname -> Foo
examples/dictionary/loop_items_kv.py
people = {
    "foo" : "123",
    "bar" : "456",
    "qux" : "789",
}

for name, uid in people.items():
    print("{} => {}".format(name, uid))