Python String Methods Flashcards
Converts the first character to upper case
capitalize()
Converts string into lower case
casefold()
Returns a centered string
center()
Returns the number of times a specified value occurs in a string
count()
Returns an encoded version of the string
encode()
Returns true if the string ends with the specified value
endswith()
Returns true if the string ends with the specified value
endswith()
Sets the tab size of the string
expandtabs()
Searches the string for a specified value and returns the position of where it was found
find()
Formats specified values in a string
format()
Formats specified values in a string
format_map()
Searches the string for a specified value and returns the position of where it was found
index()
Returns True if all characters in the string are alphanumeric
isalnum()
Returns True if all characters in the string are in the alphabet
isalpha()
Returns True if all characters in the string are ascii characters
isascii()
Returns True if all characters in the string are decimals
isdecimal()
Returns True if all characters in the string are digits
isdigit()
Returns True if the string is an identifier
isidentifier()
Returns True if all characters in the string are lower case
islower()
Returns True if all characters in the string are numeric
isnumeric()