9. Write a python program to generate an union of set_a and set_b which provided in the following output.
The output is:
set_a = set(['Python', 'Free', 'Exercises', 'Tutorials'])
set_b = set(['Tutorials', 'Free', 'Library'])
Expected Answer:
The union of set values are: {'Free', 'Library', 'Python', 'Exercises', 'Tutorials'}
Sample Answer:
set_a = set(['Python', 'Free', 'Exercises', 'Tutorials']) set_b = set(['Tutorials', 'Free', 'Library']) union_set = set_a | set_b print("The union of set values are:", union_set)
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)