Get the differnce of two sets with the set.difference() method

PHOTO EMBED

Tue Jun 18 2024 16:41:39 GMT+0000 (Coordinated Universal Time)

Saved by @pynerds #python

A = {'a', 'b', 'c', 'd', 'e', 'f'}
B = {'b', 'c', 'd'}

#get the difference
diff = A.difference(B)
print(diff)
content_copyCOPY

https://www.pynerds.com/set-difference-method-in-python/