Tuples

Tuples have almost the same properties as lists. They are the same, except tuple's cannot be changed in place as they are immutable. They are usually written in a series of items in parenthesis, instead of square brackets as lists are. Tuples do not support as many methods as lists do.

This examle shows tuples using concatenation, repetition, and indexing/slicing.

A single value in a tuple however must contain a comma. Using the built-in function type() shows what type 't' is and what type 'T' is. The only difference in the comma as it assigns it as a single item tuple instead of an integer.