When working with data, you rarely deal with just one value at a time. You need to store, access, and manipulate collections of values and that is exactly what lists are for.
A list in Python is an ordered, changeable collection that can hold multiple items in a single variable. Lists are one of the most used data structures in Python, and mastering them is essential for data processing and AI work.
Creating a List
A list is defined using square brackets [], with items separated by commas. Lists can hold any data type — numbers, strings, booleans, or even a mix.

Every item in a list has a position called an index, starting from 0. You can also use negative indexing to access items from the end.


Slicing extracts a portion of a list using the format list[start:end]. The start index is included; the end index is not.

Lists are mutable — meaning you can change their content after creation.

Here are the most frequently used list methods:

Examples:

Python has several built-in functions that work directly with lists:




List comprehension is a concise, Pythonic way to create a new list from an existing one in a single line.

We have a sales campaign on our promoted courses and products. You can purchase 1 products at a discounted price up to 15% discount.