List
noun
say it: “LIST” /lɪst/
An ordered Python collection of items in square brackets, which you can add to, take from and change after it's made.
What is a list in Python?
A list is an ordered collection of items in square brackets. You can add, remove and change items after it's made.
groceries = ["eggs", "milk", "bread"]
groceries.append("apples")
print(groceries) # ['eggs', 'milk', 'bread', 'apples']
In a sentence
- “groceries is a list of four items.”
- “Each new song goes onto the end of the list.”
Level: Apprentice · More Python terms at this level
Updated