8,470 results
Open links in new tab
  1. Global keyword in Python - GeeksforGeeks

    Jul 16, 2026 · global keyword is used to access and modify a global variable from inside a function. Without using global, assigning a …

  2. Python - Global Variables - W3Schools

    Variables that are created outside of a function (as in all of the examples in the previous pages) are known as global variables. …

  3. python - How can I use a global variable in a function? - Stack Overflow

    In Python, variables that are only referenced inside a function are implicitly global. If a variable is assigned a new value anywhere …

  4. global | Python Keywords – Real Python

    In Python, the global keyword lets you declare that a variable used inside a function is global. This allows you to modify the variable …

  5. Python Global Keyword (With Examples) - Programiz

    In this tutorial, we'll learn about the global keyword with the help of examples. In Python, the global keyword allows us to modify the …

  6. Using and Creating Global Variables in Your Python Functions

    Dec 8, 2024 · This tutorial will guide you through accessing and modifying global variables in Python functions using the global …

  7. Python - globals() function - GeeksforGeeks

    Apr 28, 2025 · In Python, the globals () function is used to return the global symbol table - a dictionary representing all the global …

  8. Programming FAQ — Python 3.15.2 documentation

    Nov 25, 2026 · In Python, variables that are only referenced inside a function are implicitly global. If a variable is assigned a value …

  9. In Python what is a global statement? - Stack Overflow

    Dec 14, 2012 · Now, we're finally to global. The global keyword is the way that you tell python that a particular variable in your …

  10. Python Global Variables — How to Use Them Correctly | W3docs

    Learn how Python global variables work, how to modify them with the global keyword, avoid UnboundLocalError pitfalls, and when to …