Asked • 05/05/19

Using global variables in a function?

How can I create or use a global variable in a function?If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?

1 Expert Answer

By:

Jake Z. answered • 05/05/19

Experienced TA & Tutor for Computer Science: Python/Java/JavaScript/C#

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.