Creation and use of Lists/Tuples (Python)

--Originally published at Quirino´s Projects

The Lists/Tuples are kind of the same, tuples are like lists but its contents cannot be modified.

A list contains a set of values, it can be almost anything, from int to floats,, from strings to even other lists.

Here are a few examples of list

myGrades = [10,10,10,10,10,10] #LOL

random = [1,”Juan”,[1,2,3],5.0,”Anita lava la tina”]

The way we access a list element is by its index

list[0] returns the first element, list[1] returns the second, and so on.

To check useful function for lists check https://www.tutorialspoint.com/python/python_lists.htm