How can I write this C code in Python?

Emile van Sebille emile at fenx.com
Sat Feb 2 10:18:55 EST 2002


"Fred" <c at tech.usd253.org> wrote in message
news:e959e7b.0202020710.417801c8 at posting.google.com...
> Hello, I am just starting out with Python. I have a very basic book
> that is not helping me much. I have done some simple C programming in
> the past and I think if I could see the below C code done in Python it
> would get me over the beginners hump. I tried to do it in Python but
> got stuck right at the start, Python did not like it when I tried to
> say: for i = 1
>

Take a couple of hours and work through the tutorial.  In there, you'll
find out that a loop in python is spelled 'for i in...' and not 'for
i=...'

HTH,


--

Emile van Sebille
emile at fenx.com

---------




More information about the Python-list mailing list