...
The result will be like below
Result |
---|
{'Jake', 'Eric', 'Jill'} {'Eric', 'Jake', 'Jill'} |
Find different elements from two arrays based on "difference" method
...
The result will be like below
Result |
---|
{'Jake', 'Eric'} {'Jill'} |
Find different elements from two arrays based on "union" method
...
The result will be like below
Result |
---|
{'John', 'Eric', 'Jake', 'Jill'} |
Print out a set containing all the participants from event A which did not attend event B
Code Block |
---|
a = ["Jake", "John", "Eric"]
b = ["John", "Jill"]
print(set(a).difference(set(b))) |