Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Loop over keys

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

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

# lname
# fname

for key in user.keys():
    print(f"{key} -> {user[key]}")

# lname -> Bar
# fname -> Foo