Computer Science, asked by aasheykhanna123, 2 months ago

xiii. Which of the following function will return the key, value pairs of a dictionary?
a. keys()
b. values()
c.items()
d. All of these​

Answers

Answered by pragyakirti12345
1

Answer: (c) items()

Explanation:

items() function will return the key, value pairs of a dictionary.

In Python Dictionary, items() function is used to return the list with all dictionary keys with values (in pair) .

Answered by sourasghotekar123
0
  1. We know that, a dictionary's values can be accessed using the keys() function.
  2. However, a dictionary's keys cannot be accessed using the values() function.
  3. The items() method in Dictionary returns a list of all dictionary keys and their values.

Hence, option C is correct.

#SPJ3

Similar questions