[exec cmd for cmd in cmds]

Schüle Daniel uval at rz.uni-karlsruhe.de
Wed Mar 8 06:54:55 EST 2006


[...]

> If you think so :) Ususally people go for dictionaries in such cases.

you are right, I didn't think about dictionaries

 >>> p = "complex(1-1e-%i, 1-1e-%i)"
 >>> d={}
 >>> [d.update({i:eval(p % (i,i))}) for i in range(20,30)]
[None, None, None, None, None, None, None, None, None, None]

so now the work is complete :)

Regards




More information about the Python-list mailing list