My InfoDb
InfoDb = []
InfoDb.append({
"FirstName": "Dillon",
"LastName": "Lee",
"DOB": "January 21",
"Residence": "San Diego",
"Email": "leedillon005@gmail.com",
"Hobbies": ["Soccer", "Videogames"]
})
print(InfoDb)
def print_data(d_rec):
print(d_rec["FirstName"], d_rec["LastName"])
print("\t", "Residence:", d_rec["Residence"])
print("\t", "Birth Day:", d_rec["DOB"])
print("\t", "Email:", d_rec["Email"])
print("\t", "Hobbies: ", end="")
print(", ".join(d_rec["Hobbies"]))
print()
# for loop algorithm iterates on length of InfoDb
def for_loop():
print("For loop output\n")
for record in InfoDb:
print_data(record)
for_loop()