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

1 Answer

0 votes
by
Be specific in these type of Python Interview Questions and Answers.

For this, we use the function keys().

>>> mydict={'a':1,'b':2,'c':3,'e':5}
>>> mydict.keys()
dict_keys([‘a’, ‘b’, ‘c’, ‘e’])
...