Home / Python / Day 3: Data Structures / Lists

Lists

Lists are ordered, mutable sequences that can store any type of element.

Python Lists

Lists are one of Python's most versatile data structures. They are ordered, mutable (changeable), and can contain duplicate values of any type.

Creating Lists

Lists are defined with square brackets [].

List Methods

append(), insert(), remove(), pop(), sort(), reverse(), clear(), copy(), extend(), index(), count()