global name is not defined - error - but for array
Steve Holden
steve at holdenweb.com
Wed Jun 28 04:23:07 EDT 2006
a wrote:
> def fn():
> for i in range(l)
> global count
> count[i]= ....
>
> how do i declare count to be global if it is an array
>
> subsequently i should access or define count as an array
>
> error:
> global name 'count' is not defined
>
The questions you are asking make it likely you would get better help on
the Python-tutor list (python-tutor at python.org, if memory serves me
right). It would seem you are new not just to Python but also to
programming, and that list is specifically for those who might find a
little coaching helpful.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Love me, love my blog http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
More information about the Python-list
mailing list