Javatpoint Logo
Javatpoint Logo

Python Dictionary items() Method

Python item() method returns a new view of the dictionary. This view is collection of key value tuples. This method does not take any parameter and returns empty view if the dictionary is empty. The examples and syntax are given below.



No parameter


It returns a dictionary's view.

Let's see some examples of items() method to understand it's functionality.

Python Dictionary items() Method Example 1

This is a simple example which returns all the items present in the dictionary.


dict_items([('name', 'rohan'), ('course', 'B.Tech'), ('email', '')])

Python Dictionary items() Method Example 2

If the dictionary is already empty, this method does not raise any error. See the example below.



Python Dictionary items() Method Example 3

Apart from items() method, we can also use other customized approaches to fetch dictionary elements. See an example below.


( name : rohan), ( course : B.Tech), ( email :, 
 dict_items([('name', 'rohan'), ('course', 'B.Tech'), ('email', '')])

Next TopicPython Dictionary

Youtube For Videos Join Our Youtube Channel: Join Now


  • Send your Feedback to

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA