my_set.add(item) # adds an item to the set my_set.remove(item) # removes an item from the set my_set.union(other_set) # returns a new set with all unique items from both sets my_set.intersection(other_set) # returns a new set with items that are common to both sets
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter