On Thu, Nov 26, 2015 at 12:06 AM, Marko Rauhamaa <ma...@pacujo.net> wrote: > However, tuples are a way to represent records, groupings of related > values, where the semantics of each value is determined by its position > in the tuple. The members in a tuple are typically of different data > types. > > Lists are collections of values. Typically, each member of list is of > the same type.
This is a distinction I generally make. Putting it another way: a list has the same meaning regardless of how many items are on it (for instance, a shopping list is still a shopping list whether it has five or fifty items on it), where a tuple is a package where each element has a specific meaning (such as Cartesian coordinates; the difference between the position (2,3) and the position (2,3,4) is not just that there's "more position" in the second one - it's a drastically different beast, living in three dimensions instead of two). Nothing in the language enforces this, but the mutability of lists does tend to align well with things that can grow and shrink, and the immutability of tuples makes them more like strings or complex numbers (in fact, a complex number is basically a tuple of two floats). ChrisA -- https://mail.python.org/mailman/listinfo/python-list