Lists
Learn about lists, a data structure in Python used to store ordered groups of data.
StartKey Concepts
Review core concepts you need to learn to master this subject
Lists
Adding Lists Together
Python Lists: Data Types
List Method .append()
Aggregating Iterables Using zip()
List Item Ranges Including First or Last Item
List Method .count()
Determining List Length with len()
Lists
Lists
primes = [2, 3, 5, 7, 11]
print(primes)
empty_list = []
In Python, lists are ordered collections of items that allow for easy use of a set of data.
List values are placed in between square brackets [ ]
, separated by commas. It is good practice to put a space between the comma and the next value. The values in a list do not need to be unique (the same value can be repeated).
Empty lists do not contain any values within the square brackets.
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory