Grouping Values
Learn how to group together related data using lists and the key functionality available for accessing and modifying lists in Python.
Lists
The list is one of the most commonly used data structures in Python, allowing us to store elements of different data types in a single container. Lists are ordered collections, similar to strings, where elements are stored linearly at specific indices. The contents of a list are enclosed by square brackets, []
, and separated by commas. This versatile data structure enables us to group multiple values together in a single variable efficiently, regardless of the type of values stored.
Get hands-on with 1400+ tech skills courses.