Python – Set issubset() Method
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 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.
The Python string count() method returns the number of times a specified value appears in the string.
The Python string encode() method encodes the string using the specified encoding. If no encoding is specified, UTF-8 will be used.
The Python string endswith() method returns “True” if the string ends with the specified value, and “False” if it does not.
The Python string expandtabs() method sets the tab size to the specified number of whitespaces.
The Python string find() method finds the first occurrence of the specified value, and returns -1 if the value is not found.
The Python string format() method formats the specified value(s) and insert them inside the string’s placeholder and returns the formatted string.
The Python string index() method finds the first occurrence of the specified value, and raises an exception if the value is not found.
The Python string isalnum() method returns True if all the characters are alphanumeric, meaning alphabet letter (a-z) and numbers (0-9).
The Python string isalpha() method returns True if all the characters are alphabet letters (a-z).