.items()
Published May 23, 2022
Contribute to Docs
The .items()
method of a Python dictionary returns a list of tuples for each key-value pair in a dictionary. It takes no arguments.
Syntax
dictionary.items()
Codebyte Example
The following example creates a dictionary, then prints the dictionary and the output from .items()
:
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.