1/27
Looks like no tags are added yet.
replace(old, new)
returns copy of string with replacements
replace(old, new, count)
only replaces first count of occurrences
find(x)
returns index of first occurence
find(x, start)
begins at start index
find(x, start, end)
stops at end index
rfind(x)
searches in reverse
count(x)
return number of occurrences
isalnum()
returns True if all characters are letters or numbers 0-9
isdigit()
returns True is all characters are numbers 0-9
islower()
returns True if all characters are lowercased
isupper()
returns True if all characters are uppercase
isspace()
returns True if all characters are whitespace
startswith(x)
returns True if the string starts with x
endswith(x)
returns True if the string end with x
capitalize()
returns copy with first character capitalized and the rest lowercase
lower()
returns all lowercased copy
upper()
returns all uppercased copy
strip()
returns copy with all leading and trailing whitespace removed
title()
returns copy with first final letters of words capitalized
list.appendix(x)
adds items to the end of the list
list.insert(i,x)
inserts element (x) and the specified index (i)
list.remove(x)
removes first occurrences
list.pop(i)
removes item at the index and returns the value
list.sort()
sorts elements of a list in place
list.reverse()
reverses order of elements
list.index(x)
returns index of the first occurrence
list.count(x)
returns number of times x appears
sorted()
sorts existing list that’s inputted
*must be assigned to a variable —> my.lists = sorted(num_list)