Python – Set add() Method
The Python set add() method adds an item to a set.
The Python set difference() method returns a set that contains the difference between two sets.
The Python set difference_update() method removes the items that exist in both sets.
The Python set discard() method removes the specified item from the set.
The Python set intersection() method returns a set that contains only items that exist in both sets, or in all sets if more than two sets are compared.
The Python set intersection_update() method removes the items that are not present in both sets, or in all sets if more than two sets are compared.
The Python set isdisjoint() method returns True if none of the items are present in both sets, otherwise it returns False.
The Python set issubset() method returns True if all items in the set exists in the specified set, otherwise it returns False.
The Python set issuperset() method returns True if all items in the specified set exists in the original set, otherwise it returns False.
The Python set remove() method removes the specified element from the set.
The Python set symmetric_difference() method returns a set that contains all items from both sets, but not the items that are present in both sets.
The Python set symmetric_difference_update() method updates the original set by removing items that are present in both sets, and inserting other items.
The Python set union() method returns a set that contains all items from the original set, and all items from the specified set(s).
The Python set update() method updates the current set by adding items from another set or sets (or any other iterable).
The Python string capitalize() method returns a string where the first character is upper case, and the rest is lower case.
The Python string casefold() method returns a string where all the characters are lower case.
The Python string center() method will center align the string, using a specified character (space is default) as the fill character.