| Method | Description |
|---|
| capitalize() | Converts the first character to upper case Usage: x = txt.capitalize() |
| casefold() | Converts string into lower case |
| center() | Returns a centered string Usage: x = txt.center(15, "-"). total characters: 15. “-“s will be placed remaining characters from both sides |
| count() | Returns the number of times a specified value occurs in a string Usage: x= string.count(value, start, end) |
| encode() | Returns an encoded version of the string Usage: x = string.encode(encoding=encoding, errors=errors) |
| endswith() | Returns true if the string ends with the specified value Usage: |
| expandtabs() | Sets the tab size of the string Usage: |
| find() | Searches the string for a specified value and returns the position of where it was found Usage: |
| format() | Formats specified values in a string Usage: |
| format_map() | Formats specified values in a string Usage: |
| index() | Searches the string for a specified value and returns the position of where it was found Usage: |
| isalnum() | Returns True if all characters in the string are alphanumeric Usage: |
| isalpha() | Returns True if all characters in the string are in the alphabet Usage: |
| isascii() | Returns True if all characters in the string are ascii characters Usage: |
| isdecimal() | Returns True if all characters in the string are decimals Usage: |
| isdigit() | Returns True if all characters in the string are digits Usage: |
| isidentifier() | Returns True if the string is an identifier Usage: |
| islower() | Returns True if all characters in the string are lower case Usage: |
| isnumeric() | Returns True if all characters in the string are numeric Usage: |
| isprintable() | Returns True if all characters in the string are printable Usage: |
| isspace() | Returns True if all characters in the string are whitespaces Usage: |
| istitle() | Returns True if the string follows the rules of a title Usage: |
| isupper() | Returns True if all characters in the string are upper case Usage: |
| join() | Converts the elements of an iterable into a string Usage: |
| ljust() | Returns a left justified version of the string Usage: |
| lower() | Converts a string into lower case Usage: |
| lstrip() | Returns a left trim version of the string Usage: |
| maketrans() | Returns a translation table to be used in translations Usage: |
| partition() | Returns a tuple where the string is parted into three parts Usage: |
| replace() | Returns a string where a specified value is replaced with a specified value Usage: |
| rfind() | Searches the string for a specified value and returns the last position of where it was found Usage: |
| rindex() | Searches the string for a specified value and returns the last position of where it was found Usage: |
| rjust() | Returns a right justified version of the string Usage: |
| rpartition() | Returns a tuple where the string is parted into three parts Usage: |
| rsplit() | Splits the string at the specified separator, and returns a list Usage: |
| rstrip() | Returns a right trim version of the string Usage: |
| split() | Splits the string at the specified separator, and returns a list Usage: |
| splitlines() | Splits the string at line breaks and returns a list Usage: |
| startswith() | Returns true if the string starts with the specified value Usage: |
| strip() | Returns a trimmed version of the string Usage: |
| swapcase() | Swaps cases, lower case becomes upper case and vice versa Usage: |
| title() | Converts the first character of each word to upper case Usage: |
| translate() | Returns a translated string Usage: |
| upper() | Converts a string into upper case Usage: |
| zfill() | Fills the string with a specified number of 0 values at the beginning Usage: |