Question: python Write a function called dog owners that takes as a parameter a list of tuples (each containing a name and a type of pet
python

Write a function called dog owners that takes as a parameter a list of tuples (each containing a name and a type of pet ("dog", "cat" or "rabbit")) and returns a list of the names of the people who have dogs as pets. example function call: tuplist = [("Patrick","dog"),("Squidward","dog"),("Sandy","rabbit")] print(dog_owners(tuplist)) would print out this list ["Patrick", "Squidward"]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
