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 Answer
+ 1
Use a dictionary.