Ok so I have two lists in python
a = ['bad', 'horrible']
b = ['bad', 'good']
I’m using the set operator to compare the two lists and give an output if a common word exists between the two sets.
print set(a) & set (b)
This gives the output as,
set(['bad'])
Is there anyway to remove the keyword ‘set’ in the output??
I want the output to look like
['bad']
Simply convert set to list: