How to create a global variable from local scope (function)?Questions & Answers › Category: Python › How to create a global variable from local scope (function)? 0 Vote Up Vote Down Geek Boy Staff asked 3 years ago How to create a global variable from local scope (function)? a. Use the nonlocal keyword b. Use the local keyword c. Use the global keywordShare this: Share on Facebook (Opens in new window) Facebook Share on X (Opens in new window) X Share on WhatsApp (Opens in new window) WhatsApp Print (Opens in new window) Print Share on LinkedIn (Opens in new window) LinkedIn Share on Pinterest (Opens in new window) Pinterest Like this:Like Loading...1 Answers 0 Vote Up Vote Down Lokesh Kumar Staff answered 3 years ago c. Use the global keywordShare this: Share on Facebook (Opens in new window) Facebook Share on X (Opens in new window) X Share on WhatsApp (Opens in new window) WhatsApp Print (Opens in new window) Print Share on LinkedIn (Opens in new window) LinkedIn Share on Pinterest (Opens in new window) Pinterest Like this:Like Loading...