dictionary1 = []
dictionary1.append({
"name": "Peyton Leigh",
"age": 16,
"height": "5 1/2 feet",
"email": "ptleigh08@gmail.com"
})
dictionary1.append({
"name": "David Lee",
"age": 51,
"height": "9 foot",
"email": "example.test@gmail.com"
})
def function1(record):
print(record["name"])
print(record["age"])
print(record["height"])
print(record["email"])
def function2(dictionary1):
for record in dictionary1:
function1(record)
function2(dictionary1)
Python Dictionaries • 1 min read
Description
This is an experiment with python dictionaries