On Wed, Jul 22, 2009 at 9:08 AM, Mike <[email protected]> wrote:

>
> Thanks guys, the zip solution worked perfectly. I never thought about
> trying that. I'm sure the range solution would of worked too for my
> example, but in my real problem the "x" list was the result of an
> arctan function, so no real simple pattern the range function could
> handle. Thanks again
> >
>
It should've worked, x doesn't neex to be a range

z = [y[i]^x[i] for i in range(len(x))];

it says...   i goes from 0  to   length(x)-1
i   is the "index" or "position"
then it gets y's  and x's   ith-position
y[i],   x[i]
and does whatever operation you indicate

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-edu" group.
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-edu?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to