Lists in Python are used to store multiple values in a single place. They are one of the most important data structures because they help you work with collections of items such as names, numbers, categories, file paths, or any set of values you want to process together. In data analysis, lists are often used for storing column names, filtering conditions, groups of values to include or exclude, and intermediate results produced during processing.
A list is created using square brackets. Items inside a list are separated by commas. Lists can contain numbers, strings, or even a mix of different data types. Python also allows lists inside lists, which is useful when working with grouped data or structured outputs. Each item in a list has a position called an index, and indexing starts at 0. This means the first item is at index 0, the second at index 1, and so on. You can also use negative indexing to access items from the end of the list.
Lists are mutable, which means you can change them. You can add items, remove items, replace items, and sort them. Common operations include append() to add an item at the end, insert() to add at a specific position, remove() to delete by value, and pop() to remove by index. You can find the length of a list using len(). Slicing is another useful feature, where you can extract a portion of a list using start and end positions. This is helpful when you need only a subset of items.
Lists work very well with loops. You can go through each item and apply logic, such as cleaning text, converting types, or calculating values. They are also used in list comprehensions, which allow you to create new lists in a clean and compact way.
In practical analytics work, lists help you keep code organised. For example, you might store all required columns in a list and check whether a dataset has them before analysis, or store a list of valid categories to clean inconsistent entries.

