Creation and use of Lists/Tuples (Python)

--Originally published at angelmendozas

  • Lists are what they seem – a list of values. Each one of them is numbered, starting from zero – the first one is numbered zero, the second 1, the third 2, etc. You can remove values from the list, and add new values to the end. Example: Your many cats’ names.
  • Tuples are just like lists, but you can’t change their values. The values that you give it first up, are the values that you are stuck with for the rest of the program. Again, each value is numbered starting from zero, for easy reference. Example: the names of the months of the year.

Here’s a really good page to learn about them: http://sthurlow.com/python/lesson06/

Basically, you create lists when you can delete values, and change then as you wish in your code and tuples do not let you do this, they are constants we could say.