Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > Use dicts, not lists or tuples: > > a = dict(name='yadda', val=42) > print a['name'] > print a['val']
I guess you will then need a list or tuple to store the dicts? I might have made it with a list of class instances: class a: def __init__(self,name,val): self.name=name self.val=val l=list() l.append(a('yadda',42)) print l[0].name print l[0].val Is the dict preferable to a list or tuple of class instances? -- Brian (remove the sport for mail) http://www.et.web.mek.dtu.dk/Staff/be/be.html http://www.rugbyklubben-speed.dk -- http://mail.python.org/mailman/listinfo/python-list