Answers for "get dict values in python"

7

python get dict values as list

food_list=list(data.values())
print(food_list)
Posted by: Guest on February-29-2020
0

get a value from a dictionary python

#!/usr/bin/python

dict = {'Name': 'Zabra', 'Age': 7}
print "Value : %s" %  dict.get('Age')
print "Value : %s" %  dict.get('Education', "Never")
Posted by: Guest on November-30-2020

Python Answers by Framework

Browse Popular Code Answers by Language