how do i make an array global

Erik Max Francis max at alcyone.com
Wed Jun 28 01:32:57 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

	count = [...]

	def fn():
	    global count
	    for i in range(l):
	        count[i] = ...

-- 
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
  San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
   Every human being is a problem in search of a solution.
    -- Ashley Montagu



More information about the Python-list mailing list