Python Set Methods: Tutorials References Exercises Menu Paid Courses
Python Set Methods: Tutorials References Exercises Menu Paid Courses
Dark code
HTML CSS JAVASCRIPT
Python has a set of built-in methods that you can use on sets.
Method Description
difference() Returns a set containing the difference between two or more sets
difference_update() Removes the items in this set that are also included in another, specified
set
intersection_update() Removes the items in this set that are not present in other, specified
set(s)
symmetric_difference_update() inserts the symmetric differences from this set and another
update() Update the set with another set, or any other iterable
https://www.w3schools.com/python/python_ref_set.asp 1/4