List Methods
Method Syntax Parameter Return Error Remarks
append [Link](x) x None AttributeError Adds end
extend [Link](iterable) iterable None TypeError Adds
multiple
insert [Link](i,x) i,x None TypeError Insert
position
remove [Link](x) x None ValueError First
occurrence
pop [Link]([i]) i element IndexError Remove
index
clear [Link]() - None - Remove
all
index [Link](x) x int ValueError Find index
count [Link](x) x int - Count
sort [Link]() key,reverse None TypeError Sort
reverse [Link]() - None - Reverse
copy [Link]() - list - Shallow
copy
String Methods
Method Syntax Parameter Return Error Remarks
lower [Link]() - str - Lowercase
upper [Link]() - str - Uppercase
strip [Link]() chars str - Trim
split [Link](sep) sep list - Split
join [Link](it) iterable str TypeError Join
replace [Link]() old,new str - Replace
find [Link]() sub int - -1 if
absent
index [Link]() sub int ValueError Error if
absent
startswith [Link]() prefix bool - Check
start
endswith [Link]() suffix bool - Check end
isalpha [Link]() - bool - Alphabet
isdigit [Link]() - bool - Digits
Dictionary Method
Method Syntax Parameter Return Error Remarks
keys [Link]() - dict_keys - Keys
values [Link]() - dict_values - Values
items [Link]() - dict_items - Pairs
get [Link](key) key value - Safe
access
update [Link]() dict None TypeError Merge
pop [Link](key) key value KeyError Remove
popitem [Link]() - tuple KeyError Last pair
clear [Link]() - None - Clear
setdefault [Link]() key value - Insert
copy [Link]() - dict - Shallow
copy