How to find the intersection of two sets in Python

1 Answer

0 votes
setA = {1, 2, 3, 4, 5}
setB = {6, 0, 2, 1, 7, 9}

print(setA & setB)



'''
run:

{1, 2}

'''

 



answered Apr 18, 2021 by avibootz

Related questions

...