Professional Documents
Culture Documents
Method Description
capitalize() Returns a copy of the string with the first letter capitalized
find(s) Returns the index of the first occurrence of s in the
string, or -1 if s is not in the string
find(s, beg) Returns the index of the first occurrence of s after
index beg in the string, or -1 if s is not in the string
after index beg
find(s, beg, end) Returns the index of the first occurrence of s between
indices beg and end in the string, or -1 if s is not in
the string between indices beg and end
islower() Tests that all characters are lowercase
isupper() Tests that all characters are uppercase
lower() Returns a copy of the string with all characters converted
to lowercase
replace(old, new) Returns a copy of the string with all occurrences of
the substring old replaced with new
split() Returns the space-separated words as a list
split(del) Returns the del-separated words as a list
strip() Returns a copy of the string with leading and trailing
whitespace removed
strip(s) Returns a copy of the string with the characters in s
removed
upper() Returns a copy of the string with all characters converted