A number of built-in functions create or deal with
lists. The following functions apply to all
sequences, including tuples and
strings.
len(object ) →
integer
Return the number of items of a sequence or mapping.
max(list ) →
value
Return the largest item in the sequence.
min(list ) →
value
Return the smallest item in the sequence.
any(tuple ) →
boolean
Return True if there exists an item in
the sequence which is True.
all(tuple ) →
boolean
Return True if all items in the sequence
are True.
range([start],
stop, [step]
) → list of int
The arguments must be plain integers. If the
step argument is omitted, it defaults to 1.
If the start argument is omitted, it
defaults to 0. The full form returns a list
of plain integers [start,
start + step,
start + 2 * step, ...].
If step is positive, the last element is
the largest start + i *
step less than stop;
if step is negative, the last element is
the largest start + i *
step greater than
stop. step must not
be zero (or else ValueError is
raised).
Published under the terms of the Open Publication License