[go: up one dir, main page]

0% found this document useful (0 votes)
173 views1 page

Python List Methods

This document describes common list methods in Python including append, clear, copy, count, extend, index, insert, pop, remove, reverse, and sort. Append adds a single element to the end of a list. Clear removes all items from a list. Copy returns a shallow copy of a list. Count returns the number of times an element appears in a list.

Uploaded by

Linh Lê
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
173 views1 page

Python List Methods

This document describes common list methods in Python including append, clear, copy, count, extend, index, insert, pop, remove, reverse, and sort. Append adds a single element to the end of a list. Clear removes all items from a list. Copy returns a shallow copy of a list. Count returns the number of times an element appears in a list.

Uploaded by

Linh Lê
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

PYTHON

List Methods @AbzAaron

APPEND
Add single element to
end of list

CLEAR
Remove all Items from
list

COPY
Return shallow copy of
list

COUNT
Return count of an
element in list

EXTEND
Adds iterable elements
to end of list

INDEX
Return index of first element
in list matching given value

INSERT
Insert element to list at
given index

POP
Remove element at given
index and returns it

REMOVE
Remove first item from
list that has given value

REVERSE
Reverse the list

SORT
Sort elements of a list

You might also like