what is wrong with my python code?

Pierre GM pgmdevlist at gmail.com
Wed Feb 7 12:58:07 EST 2007


On Wednesday 07 February 2007 12:43:34 Dongsheng Ruan wrote:
> I got feed back saying" list object is not callable". But I can't figure
> out what is wrong with my code.

> for i in range(l):
>      print A(i)

You're calling A, when you want to access one of its elements: use the 
straight brackets [

for i in range(l):
      print A[i]



More information about the Python-list mailing list