Python - String
str
Strings are immutable sequences of Unicode code points.
String literals that are part of single expression and have only whitespace
between them will be implicitly converted to a single string literal.
That is,('hello' ' ' 'world') == 'hello world'
.
str(object='')
str(object=b'', encoding='utf-8', errors='strict')
# Python3
object
, ifobject
is not provided, returns the empty string.
- str.capitalize()
- str.center(width[, fillchar])
- str.count(sub[, start[, end]])
- str.decode([encoding[, errors]])
- str.encode([encoding[, errors]])
- str.endswith(suffix[, start[, end]])
- str.expandtabs([tabsize])
- str.find(str[, start[, end]])
- str.format(*args, **kwargs)
- str.index(sub[, start[, end]])
- str.isalnum()
- str.isalpha()
- str.isdigit()
- str.islower()
- str.isspace()
- str.istitle()
- str.isupper()
- str.join(iterable)
- str.ljust(width[, fillchar])
- str.lower()
- str.lstrip([chars])
- str.partition(sep)
- str.replace(old, new[, count])
- str.rfind(sub[, start[, end]])
- str.rindex(sub[, start[, end]])
- str.rjust(width[, fillchar])
- str.rpartition(sep)
- str.rsplit([sep[, maxsplit]])
- str.rstrip([chars])
- str.split([sep[, maxsplit]])
- str.splitlines([keepends])
- str.startswith(prefix[, start[, end]])
- str.strip([chars])
- str.swapcase()
- str.title()
- str.maketrans(x[, y[, x]])
- str.translate(table[, deletechars])
- str.upper()
- str.zfill(with)