Raspberry List and Tuple
In previous lessons, we have learned data types such as Number and String. In this lesson, we will introduce the other two data types: List and Tuple.
List is a common data type in Python. It is a built-in variable sequence to store any number and any type of data set. It is created as follows:
Tuple is similar to List. The difference between them is that the element of Tuple cannot be modified, and List uses square brackets while Tuple uses parentheses. Tuple is also created simply by adding elements in parentheses and separating them with commas. After a Tuple is created, we can access the values in the Tuple.