Python – String rpartition() Method
The Python string rpartition() method searches for the last occurrence of a specified string, and splits the string into a tuple containing three elements.
The Python string rpartition() method searches for the last occurrence of a specified string, and splits the string into a tuple containing three elements.
The Python string rsplit() method splits a string into a list, starting from the right.
The Python string rstrip() method removes any trailing characters (space is the default leading trailing to remove).
The Python string splitlines() method splits a string into a list at line breaks.
The Python string startswith() method returns True if the string starts with the specified value, or False if it does not.
The Python string strip() method removes any leading, and trailing whitespaces.
The Python string swapcase() method returns a string where all the upper case letters are lower case and vice versa.
The Python string title() method returns a string where the first character in every word is upper case (as in a header or a title).
The Python string translate() method returns a string where specified characters are replaced as described in a dictionary or mapping table.
The Python string upper() method returns a string where all characters are lower case.
The Python string zfill() method adds zeros (0) at the beginning of the string until it reaches the specified length.
The Python tuple count() method returns the number of times a specified value appears in the tuple.
The Python tuple index() method returns the position at the first occurrence of a specified value of any type (string, number, list, etc.).
Python arithmetic operators are used with numeric values to perform common mathematical operations.
Python identity operators are used to compare objects, not to see if they are just equal, but are actually the same object, with the same memory location.