0
How do i assign an owner to his/her pets?
Both lists are lists of objects, owner list with attributes name, lastname, and petlist with attributes typeofpet,name, gender and age. Parent=[[”Sara”, ”Johnson”],[”Hector”, ”Rodriguez”]] Pets=[[”cat”, ”catname”, ”male”, 2],[”bird”, ”birdname”, ”female”, 3]] How do i for example give sara both of the pets?
1 Respuesta
+ 1
Use a dictionary.