Built in String Methods Python
Built in String Methods Python
endswith(suffix[, start[, end]]) - Checks if the string ends with the specified suffix.
find(sub[, start[, end]]) - Returns the lowest index of the substring, or -1 if not found.
index(sub[, start[, end]]) - Returns the lowest index of the substring, raises ValueError if not found.
maketrans(x[, y[, z]]) - Creates a translation table for use with translate().
partition(sep) - Splits the string into a 3-tuple around the first occurrence of sep.
rfind(sub[, start[, end]]) - Returns the highest index of the substring, or -1 if not found.
rindex(sub[, start[, end]]) - Returns the highest index of the substring, raises ValueError if not found.
rpartition(sep) - Splits the string into a 3-tuple around the last occurrence of sep.
rsplit(sep=None, maxsplit=-1) - Splits the string from the right, optionally limiting the splits.
split(sep=None, maxsplit=-1) - Splits the string into a list using the specified separator.
startswith(prefix[, start[, end]]) - Checks if the string starts with the specified prefix.
zfill(width) - Pads the string with zeros on the left to reach the specified width.