Iteration index

Nick Perkins nperkins7 at home.com
Thu May 31 15:48:14 EDT 2001


"Marek Augustyn" <maug at kopnet.gliwice.pl> wrote in message
news:9f63lo$rb0$1 at zeus.polsl.gliwice.pl...


> i = 0 # additional variable
> for el in s:
>     print i, el
>     i += 1
>

for i in range(len(s)):
    print i, s[i]


> 2. Are there block comments in Python? (like /* */ in C)

i don't think so.







More information about the Python-list mailing list