7. Write a python program to generate an intersection 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', 'Sets', 'Library', 'List'])
Expected Answer:
The intercept value is: {'Tutorials'}
Sample Answer:
set_a = set(['Python', 'Free', 'Exercises', 'Tutorials']) set_b = set(['Tutorials', 'Sets', 'Library', 'List']) intercept_set = set_a & set_b print("The intercept value is:", intercept_set)
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)