List
Week 2
InfoDb = []
InfoDb.append({
"FirstName": "James",
"LastName": "Lee",
"DOB": "Sempember 5",
"Residence": "San Diego",
"Email": "michaelmichael6909@gmail.com",
"Owns_sisters": ["Chole", "Rayna"]
})
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", "Owns_sisters:", ", ".join(d_rec["Owns_sisters"]) )
def while_loop():
print("While loop output\n")
i = 0
for i in range(0, len(InfoDb)):
record = InfoDb[i]
print_data(record)
return
while_loop()