item
to the end of the list.item
at the specified index
.index
. Default is the last item.item
.list[start:end:step]
returns a sliced portion of the list.[expression for item in iterable if condition]
item
.item
.a, b, c = my_tuple
key
.(key, value)
pair.(key, value)
pairs.item
to the set.item
from the set. Raises KeyError
if not found.item
from the set if present.other_set
.other_set
.True
if the string starts with the specified prefix
.True
if the string ends with the specified suffix
.-1
if not found.substring
.old
with new
.delimiter
.function
to every item of sequence
and returns an iterator.sequence
for which function
returns True
.AssertionError
if false.Exception
.DEBUG
.INFO
.WARNING
.ERROR
.CRITICAL
.name
.obj
to a file-like object.obj
to a JSON-formatted string.a
and b
.a
and b
.range(start, stop, step)
.k
unique elements from population
.k
elements from population
, allowing repeats.n
.k
random bits.sequence
.@decorator
to modify function behavior.@decorator
to modify class behavior.yield
to return values one at a time.(expression for item in iterable if condition)