Python Create List
Syntax
Lists in Python are created by enclosing a sequence of items in square brackets [].
# Creating an empty listempty_list = []
# Creating a list with elementsnumbers = [1, 2, 3, 4, 5]fruits = ["apple", "banana", "cherry"]Example
# Creating and displaying a list of favorite colorsfavorite_colors = ["blue", "green", "red", "yellow"]print(f"My favorite colors are: {favorite_colors}")