Re: [Tutor] Starting over with Python

2006-12-15 Thread Chuck Coker
JC> If anyone could direct me to some site where python is associated JC> with Cryptography I would be very grateful. John, I did a quick Google search using +"python" +"cryptography" as the search term and Google reported Results 1 - 10 of about 1,030,000 for +"python" +"cryptography". (0.09

Re: [Tutor] Starting over with Python

2006-12-14 Thread James Cunningham
Sum works just fine, as others have said. A more generic way to do this: reduce(lambda x, y: x + y, (i for i in range(100) if i % 2)) Reduce iterates through the list, calling x + y on the next element in the list and the previous sum, in effect summing the whole thing. I might do the following:

Re: [Tutor] Starting over with Python

2006-12-13 Thread Luke Paireepinart
John Carmona wrote: > After quite a while away from Python, I have decided to re-study Python. I > am interested to learn Python to support my love for Cryptography. I have a > first very easy question (did some search on Google but could not find > anything helpful). I realise that this is very

Re: [Tutor] Starting over with Python

2006-12-13 Thread Andreas Kostyrka
* John Carmona <[EMAIL PROTECTED]> [061214 02:21]: > After quite a while away from Python, I have decided to re-study Python. I > am interested to learn Python to support my love for Cryptography. I have a > first very easy question (did some search on Google but could not find > anything helpfu

Re: [Tutor] Starting over with Python

2006-12-13 Thread wesley chun
> odd =1 > >>>while odd <=100: > if (odd%2)==1: > print odd > odd = odd + 1 > - > I get a list of the odd numbers from 1 to 99. But now if I wanted to add > those number t

Re: [Tutor] Starting over with Python

2006-12-13 Thread R. Alan Monroe
> odd =1 while odd <=100: > if (odd%2)==1: > print odd > odd = odd + 1 > - > I get a list of the odd numbers from 1 to 99. But now if I wanted to add > those number t

[Tutor] Starting over with Python

2006-12-13 Thread John Carmona
After quite a while away from Python, I have decided to re-study Python. I am interested to learn Python to support my love for Cryptography. I have a first very easy question (did some search on Google but could not find anything helpful). I realise that this is very basic so be gentle with me.