Return to Snippet

Revision: 70817
at July 20, 2016 16:37 by GabrielTheodoulos


Initial Code
data = {'Ken':89, 'John': 92, 'Sue':95, 'Karen':78} #Sets up our Dictionary

your_list = list(data.values())
# (don't use 'list' as the variable name
# since it's already a standard function)

print(your_list)
# [89, 92, 95, 78]

Initial URL
http://stackoverflow.com/questions/38319568/how-do-i-make-a-list-out-of-data-derived-from-a-dictionary/38319779#38319779

Initial Description
This shows how to convert values from a dictionary and make them a list.

Initial Title
Dictionary Values to a List

Initial Tags
list

Initial Language
Python