Snippets Collections
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
star

Sat Apr 01 2023 19:37:18 GMT+0000 (Coordinated Universal Time) https://www.javacodegeeks.com/core-python-cheatsheet.html

#sets #python

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension