Pythondex

Tutorial

Lists in Python

In Python, a list is a collection of items that can store multiple values in a single variable.

Creating Lists

Accessing List Items

Explanation

  • Lists are ordered, meaning the items have a defined sequence.
  • Indexing starts at 0, negative indices access items from the end.
  • Lists can contain items of different data types.