Skip to content

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

@Scottan

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}")

Metadata

Metadata

Assignees

No one assigned

    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