Often in programming you process large amounts of data. In these cases, one variable cannot be assigned to each object / value. Lists create the ability to store multiple values in the same variable to handle large amounts of data.
Suppose you have, for example, data from thousands of data points. Somehow, we have to be able to handle this data in a simple and efficient way. Arrays / Lists create the possibility to store multiple values in the same variable.
There are four ways in Python to store multiple values in the same variable
We will have a look at each way in detail, and also show some pros and cons of different methods.