Home »
Python »
Python Dictionary MCQs
What does the dict.items() method do?
25. What does the dict.items() method do?
- It returns all the keys of the dictionary as a tuple
- It returns all the keys and pairs of the dictionary as a tuple
- It returns all the pairs of the dictionary as a tuple
Answer: B) It returns all the keys and pairs of the dictionary as a tuple
Explanation:
The dict.items() returns all the keys and pairs of the dictionary as tuple.