On Mon, 22 Dec 2008 22:32:17 -0500
Aaron Stepp <[email protected]> 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 <[email protected]> | 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