Global variables

Richard Pasco richardpasco at quintessa.org
Tue Dec 10 11:46:18 EST 2002


"Richard Pasco" <richardpasco at quintessa.org> wrote in message
news:%LoJ9.2972$9R.10589195 at newsr2.u-net.net...
> As a relative newbie to programming in general I know what local and
global
> variables are, but I can't seem to get local ones back into my main
program.
> What exactly does the return function do? Does it "push" the variable into
> my main program? And then how can I get them into another function without
> making them global?
>
Something like this...

def func():
    f = 3*5
    return f
func()
print f





More information about the Python-list mailing list