Question: Python: Set my _ favorites contains 'cobalt', 'ivory', and 'red'. Set your _ favorites contains three strings read from input. Assign likeable _ colors with
Python: Set myfavorites contains 'cobalt', 'ivory', and 'red'. Set yourfavorites contains three strings read from input. Assign likeablecolors with the union of myfavorites and yourfavorites.
Ex: If the input is:
cobalt
ivory
purple
then the output is:
My favorite colors: cobalt 'ivory', 'red'
Your favorite colors: cobalt 'ivory', 'purple'
Likeable colors: cobalt 'ivory', 'purple', 'red'
Note: Because sets are unordered, the sets are printed using the sorted function here for comparison.
myfavorites cobalt 'ivory', 'red'
yourfavorites input input input
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
