Skip to content

How to retrieve dictionary values in Python by index?

a_dictionary = {"a": 1, "b": 2, "c":3}
keys_list = list(a_dictionary)
key = keys_list[0]
See also  Python code snippet - How to downgrade a package ?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.