[Tutor] a very simple question

Senthil_OR at Dell.com Senthil_OR at Dell.com
Fri Mar 23 12:45:14 CET 2007


Carson Wendy wrote:
> ok, i just started python and i'm stuck on this, could use some help
> :D 
> a='test'
> def f():
>      a=a+'gg'

Look for the definition of  'global'
And try this:
>>> a = 'test'
>>> def f()
	global a
	a = a + 'gg'
	print a
>>>f()


-- 
Senthil


Dish of the Day: Good evening, madame and gentlemen. I am the main dish
of the day. May I interest you in parts of my body? 


More information about the Tutor mailing list