Hello,
I learn tuples and I came acros the folloving explanation which I don't understand practicly because the scipt is not complet..., I think tha they want to show the direction but for me would be better complet example...
so it's from document: Think Python (version 1.1.19) and text is (in green):
It is common to use tuples as keys in dictionaries (primarily because you can’t use lists). For example,
a telephone directory might map from last-name, first-name pairs to telephone numbers.
Assuming that we have defined last, first and number, we could write:
directory[last,first] = number
The expression in brackets is a tuple. We could use tuple assignment to traverse this dictionary.
for last, first in directory:
print first, last, directory[last,first]
This loop traverses the keys in directory, which are tuples. It assigns the elements of each tuple
to last and first, then prints the name and corresponding telephone number.
There are two ways to represent tuples in a state diagram. The more detailed version shows the
indices and elements just as they appear in a list. For example, the tuple ('Cleese', 'John')
here is a link for that doc
http://en.wikibooks.org/wiki/Think_Python/Tuples
thank you