CHAPTER 31 •
PYTHON
Python Lists
Learn how to store multiple values in a list.
01 What is this?
Learn how to store multiple values in a list.
02 Syntax
Python Syntax
items = [value1, value2]
03 Example
Python Example
fruits = ['Apple', 'Mango', 'Orange'] print(fruits)
04 Important Points
Lists are ordered and mutable collections.
05 Common Mistakes
Remember that list indexes start from 0.
06 Real World Use
Lists are used to store users, products, marks and many other datasets.
07 Practice This Topic
Now try the example yourself in the AIFA Python Editor.
- Read the example carefully.
- Change the values.
- Run the code.
- Observe the output.
- Try creating your own example.