in Python by
How do you get a list of all the keys in a dictionary?

► Click here to show 1 Answer

0 votes

One of the ways we can get a list of keys is by using: dict.keys()

This method returns all the available keys in the dictionary. dict = {1:a, 2:b, 3:c} dict.keys()

o/p: [1, 2, 3]

Learn More with Madanswer

Related questions

+1 vote
asked Feb 13 in Python by SakshiSharma