examples/dictionary/loop_keys.py
from __future__ import print_function

user = {
    'fname': 'Foo',
    'lname': 'Bar',
}

for k in user.keys():
    print(k)

# lname
# fname

for k in user.keys():
    print("{} -> {}".format(k, user[k]))

# lname -> Bar
# fname -> Foo

for k in user:
    print("{} -> {}".format(k, user[k]))

# lname -> Bar
# fname -> Foo