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 myfavorites contains 'dog', 'elk', and 'lizard'. Sets kaisfavorites, anasfavorites, and kimsfavorites each contains one string read from input. Assign onlymyfavorites with a set containing only the elements of myfavorites that are not found in any of kaisfavorites, anasfavorites, and kimsfavorites.
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
