what is wrong with my python code?

Paul Rubin http
Wed Feb 7 12:47:07 EST 2007


"Dongsheng Ruan" <ruan at jcmills.com> writes:
> for i in range(l):
>      print A(i) 

Use square brackets, A[i].

Usually we'd write such a loop like this:

    for x in A:
       print x




More information about the Python-list mailing list