a=[ lambda t: t**n for n in range(4) ]

mehmetmutigozel at gmail.com mehmetmutigozel at gmail.com
Fri Apr 22 18:18:53 EDT 2005


Thanx for your replies.

I'm looking for array of functions.
Something like a=[ sin(x) , cos(x) ]

>>> x=0.0
>>> a
[0, 1]
>>> x=1.0
>>> a
...

of course it can be made by
>>> def cratearray(x):
...           ~~~~
...           return a
a=createarray(1.0)

but this isn't what i am asking for. something automized.




More information about the Python-list mailing list