On Mon, 22 Dec 2008 22:32:17 -0500 Aaron Stepp <stepp.aa...@gmail.com> wrote: > Instead of writing a long list of initializations like so: > > A = [ ] > B = [ ] > ... > Y = [ ] > Z = [ ] > > I'd like to save space by more elegantly turning this into a loop. If
Well, if all you want is a loop: for v in vars: locals()[v] = [] It's hard to tell if that's what you actually need though without deeper analysis of your requirements. -- D'Arcy J.M. Cain <da...@druid.net> | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list