We have two lists:
a=['1','2','3','4']
b=['2','3','4','5']
How to get a list with elements that are contained in both lists:
a_and_b=['2','3','4']
and a list with elements that are contained only in one list, but not the other:
only_a=['1']
only_b=['5']
Yes, I can use cycles, but it’s lame =)
Simply with the use of sets: