Python - Dicts to Lists
dictionary = {'a': 1, 'b': 2, 'c': 3}
dict_as_list = dictionary.items()
# dict_as_list now contains [('a', 1), ('b', 2), ('c', 3)]
Written by Lampros Mousselimis
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#