8. Write a python program to generate a symmetric difference between 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 symmetric difference of values are: {'Python', 'Library', 'Exercises'}
Sample Answer:
set_a = set(['Python', 'Free', 'Exercises', 'Tutorials']) set_b = set(['Tutorials', 'Free', 'Library']) difference_set = set_a ^ set_b print("The symmetric difference of values are:", difference_set)
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)