On 26/03/2011 08:52, clodemil wrote:
Alastair,

Thanks a lot.
the Pytonic way:

def Ppulse(mesures):
     return [N((l[0]-l[1]),12) for l in mesures]

works(I shall need to understand/study why!!)
Its a list comprehension.
The other solution:

def Ppulse(mesures):
     result=[]
     for k,l in enumerate(mesures)
         result.append(N((l[0]-l[1]),12))

gives a syntax error(most certainly my mistake, but what?)

You're missing a : at the end of your for k,l in enumerate(mesures) line.

Alastair

--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to