[Tutor] Do tuples replace structures?
alan.gauld at blueyonder.co.uk
Mon Jan 12 18:57:10 EST 2004
> Do tuples allow one to form data structures like those formed by
> in 'c' or are there better ways to form structures in python?
Quick n dirty structures yes, but for general use a class is
usually a better bet. Take a look at the last page of the Raw
topic in my tutor for an example of using a class to hold an "address"
structure (in the yellow box)
Author of the Learn to Program web tutor
More information about the Tutor