> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Pat > Sent: Tuesday, October 07, 2008 10:16 PM > To: python-list@python.org > Subject: Re: Array of dict or lists or ....? >
> > The Perl routine works fine and I'd like to emulate that behavior but > since I've just starting learning Python I don't know the syntax for > designing the data structure. I would really appreciate it if someone > could point me in the right direction. states = {} if 'georgia' not in states: states['georgia'] = {} states['georgia']['fulton'] = {} states['georgia']['fulton']['ps101'] = {} states['georgia']['fulton']['ps101']['math'] = {} states['georgia']['fulton']['ps101']['math']['max'] = 100 states['georgia']['fulton']['ps101']['math']['current'] = 33 states['georgia']['dekalb'] = {} states['georgia']['dekalb']['ps202'] = {} states['georgia']['dekalb']['ps202']['english'] = {} states['georgia']['dekalb']['ps202']['english']['max'] = 500 states['georgia']['dekalb']['ps202']['english']['current'] = 44 print states ***** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA621 -- http://mail.python.org/mailman/listinfo/python-list