Student Community
Resources ### Length of a List - len()

len()
function
determines
the
number
of
elements

in
a
list
and
returns
the
same.
``len(list_name)``
``````List = [1, 2, 3, 1, 2, 1, 2, 3, 2, 1]
print(len(List))``````

### Append to a List - append()

append()
method
an
element

to
the
end
of
the
list.
``list.append (element)``
``````List = ['Mathematics', 'chemistry', 1997, 2000]
List.append(20544)
print(List)``````

### Insert into a List - insert()

insert()

method
helps
us
to
insert
an
element
at
a
specific
index
in
a
list.
``list.insert(position_index, element)``
``````List = ['Mathematics', 'chemistry', 1997, 2000]
List.insert(2,10087)
print(List)``````

### Remove from a List - remove()

The
remove()
method
removes
the
specified
item
from
a
list.
``list.remove(element)``
``````List = [2.3, 4.445, 3, 5.33, 1.054, 2.5]
List.remove(3)
print(List)``````

### Delete from a List - del

The
del
keyword
removes
the
specified
index
and
can
also
delete
the
list
completely.
``del list[index]``
``````List = [2.3, 4.445, 3, 5.33, 1.054, 2.5]
del List
print(List)``````

### Minimum item of a List - min()

List
method
min()
returns
the
elements
from
the
list
with
minimum
value.
``min(List)``
``````List = [2.3, 4.445, 3, 5.33, 1.054, 2.5]
print(min(List))``````

### Maximum item of a List - max()

List
method
max()
returns
the
elements
from
the
list
with
maximum
value.
``max(List)``
``````List = [2.3, 4.445, 3, 5.33, 1.054, 2.5]
print(max(List))``````

### Sum of items in a List - sum()

The
sum()
function
returns
the
sum
of
all
items
in
a
list.
``sum(List)``
``````List = [1, 2, 3, 4, 5]
print(sum(List))``````