D
David Hitillambeau
Hi guys,
As I am new to Python, i was wondering how to declare and use global
variables. Suppose i have the following structure in the same module (same
file):
def foo:
<instructions>
<instructions>
def bar:
<instructions>
<instructions>
I want to enable some sharing between the two functions (foo and bar)
using one global variable in such a way that each function can have read
and write access over it.
How can i manage this please?
I've read about "The global statement" in python's documentation and still
can't figure out it's use.
Thanks.
As I am new to Python, i was wondering how to declare and use global
variables. Suppose i have the following structure in the same module (same
file):
def foo:
<instructions>
<instructions>
def bar:
<instructions>
<instructions>
I want to enable some sharing between the two functions (foo and bar)
using one global variable in such a way that each function can have read
and write access over it.
How can i manage this please?
I've read about "The global statement" in python's documentation and still
can't figure out it's use.
Thanks.