On 8/1/2011 8:34 PM, Mike Nickey wrote:
[snip]
[{'city': 'Buena Park', 'region_name': 'CA', 'area_code': 714},
{'city': 'Wallingford', 'region_name': 'CT', 'area_code': 203},
{'city': 'Schenectady', 'region_name': 'NY', 'area_code': 518},
{'city': 'Athens', 'region_name': '35'}]
IMHO this is overkill.
Consider instead using City-Region as the key and storing the pther
attributes in a tuple. There is no need to have separate dictionaries or
lots of repetitive keys:
cities = {
'Buena Park CA': (414, 'Santa Clara, CA'),
'Wallingford'CT: (203),...}
--
Bob Gailer
919-636-4239
Chapel Hill NC
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor