/ Published in: Python
This shows how to convert values from a dictionary and make them a list.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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]