Question: In python please. Set my _ favorites contains 'dog', 'elk', and 'lizard'. Sets kais _ favorites, anas _ favorites, and kims _ favorites each contains

In python please. Set my_favorites contains 'dog', 'elk', and 'lizard'. Sets kais_favorites, anas_favorites, and kims_favorites each contains one string read from input. Assign only_my_favorites with a set containing only the elements of my_favorites that are not found in any of kais_favorites, anas_favorites, and kims_favorites.
Click here for example
Ex: If the input is:
dog
gecko
lizard
then the output is:
My favorite animals: ['dog', 'elk', 'lizard']
Kai's favorite animals: ['dog']
Ana's favorite animals: ['gecko']
Kim's favorite animals: ['lizard']
Animals only I like: ['elk']
Note: Because sets are unordered, the sets are printed using the sorted() function here for comparison.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!