What Is a List in Python?
Author – Marie Codes
There are different tools to use for Python, here is the downloaded Learn Python editor.
Please see my brothers course, this is available for beginners and young coders and perfect for Learning Python for beginners.
A list is an ordered collection of items.
In Python, lists are created using square brackets [] and can store strings, numbers, or even other lists.
For example, here’s a simple list of favorite foods:
Here:
-
my_favorite_foodsis the variable name. -
Each item in the list is a string inside quotes.
-
Items are separated by commas.
You can print the list like this:
Output:
Creating Multiple Lists
Let’s create another list for desserts:
Again, you can print this list to see everything:
Accessing Specific Items in a List
Python uses zero-based indexing, meaning the first item has position 0.
For example, in my_favorite_foods:
-
tacosis index0 -
pizzais index1 -
pastais index2
To print just pasta, you use square brackets and the index:
Output:
Combining Lists and Text in Print Statements
You can make your output more human-readable by combining strings and list items:
Output:
Here’s another example mixing food and dessert:
Output:
Notice how we use commas to separate parts of the sentence and + if we want to add punctuation directly to the word.
Practice Challenge
Try this on your own:
-
Create a list called
my_favorite_drinkswith 3 drinks you love. -
Print the entire list.
-
Print just the second drink in a sentence like:
Example solution:
Conclusion
Today you learned how to:
-
Create lists in Python
-
Access individual items by index
-
Print items in sentences
Practicing with lists is a fantastic way to get comfortable with Python basics. Keep experimenting—try adding more items, using different indexes, or combining lists in creative ways.
Thanks for coding with me!

If you enjoyed this tutorial, don’t forget to subscribe to our channel and share this post with friends who want to learn Python. Happy coding!
