Answers for "python calculate dictionary values"

1

how to write a dict in pytohn

# get vs [] for retrieving elements
my_dict = {'name': 'Jack', 'age': 26}

# Output: Jack
print(my_dict['name'])

# Output: 26
print(my_dict.get('age'))
Posted by: Guest on October-24-2020
2

list of dictionary values

d.values()
Posted by: Guest on March-10-2020

Code answers related to "python calculate dictionary values"

Python Answers by Framework

Browse Popular Code Answers by Language