Python Data Structures: Lists
dev.to
When I started learning Python, I quickly realised that storing one value at a time wasn't going to be enough. I needed a way to store multiple things together. That's where lists came in. At first, a list looked very simple: products = ["Bread", "Milk", "Sugar", "Soap"] But there is actually quite a lot you can do with a list. Creating a list A list is created using square brackets []. For example: names = ["Feddy", "Amina", "Brian"] A list can contain numbers: prices = [80, 120, 250