Skip to content

Add .items() method to "Spintting out keys and values" #53

Description

@Scottan

splitting-out-keys-and-values

As well as the keys() and values() methods, we should also introduce the items() method, which I personally find the most useful:

https://www.w3schools.com/python/ref_dictionary_items.asp

We should also add an example of using the .items() method in a for loop:

for key, item in dict.items():
    print(f"key {key} links to item {item}")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions