Report Bug
Qus : Which of the following function of dictionary gets all the keys from the dictionary?
Qusनिम्नलिखित में से डिक्शनरी का कौन सा फंक्शन सभी कीज को डिक्शनरी से प्राप्त करता है?

A. getkeys ()
B. key()
C. keys()
D. None


Solution
C. keys()



Explanation

In Python, the keys() function is a built-in method for dictionaries. It returns a view object that displays a list of all the keys in the dictionary. The order of the keys in the view is not guaranteed to be the same as the order in which they were inserted into the dictionary.




Report Bug