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
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:
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
* 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
> 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
> 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
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.