17 lines
424 B
Python
17 lines
424 B
Python
#!/usr/bin/python
|
|
|
|
#Tutorialspoint
|
|
# https://www.tutorialspoint.com/python/python_dictionary.htm
|
|
# Accessing Values in Dictionary
|
|
import pprint
|
|
|
|
|
|
person = {'Name': 'Zara', 'Age': 7, 'Class': 'First','Color':'Green','Phone': "413-781-7822",'Email': "bgates@microsoft.com"}
|
|
|
|
pp = pprint.PrettyPrinter(indent=4)
|
|
pp.pprint(person)
|
|
print("\n")
|
|
|
|
print("person['Name']: ", person['Name'])
|
|
print ("person['Age']: ", person['Age'])
|
|
|