Home »
Python »
Python Dictionary MCQs
What does the dict.keys() method do?
28. What does the dict.keys() 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: A) It returns all the keys of the dictionary as a tuple
Explanation:
The dict.keys() returns all keys of the dictionary as a tuple.