About 988 results
Open links in new tab
  1. python - Using global variables between files? - Stack Overflow

    If instead of thinking of a "global variable" as being a "global" variable and instead think of it as a "module" variable - then things become clear. You can import things from a module from other …

  2. Solved: How to Use Global Variables Across Multiple Files in

    Dec 5, 2024 · This post discusses effective methods to share global variables between Python files, providing practical examples and alternative approaches.

  3. How to Share a Global Variable Between C Files: Using extern ...

    Dec 3, 2025 · How to Share a Global Variable Between C Files: Using extern Keyword Explained In C programming, as projects grow, code is often split into multiple files for better organization, …

  4. How to Use Global Variables Across Multiple Files in Python

    Feb 2, 2024 · This is a short article on using global variables across multiple files in Python.

  5. Python Global Variables Across Files: How to Share Data ...

    Learn how to share data between modules in Python by using global variables across files. Discover the best practices for seamless communication in your code.

  6. How to Set Global Variables Across Modules in Python

    Feb 27, 2025 · Learn how to properly set and manage global variables across multiple modules in Python. Understand best practices, common pitfalls, and practical code examples.

  7. extern - How do I share a global variable between c files ...

    Nov 26, 2015 · If you want to use global variable i of file1.c in file2.c, then below are the points to remember: main function shouldn't be there in file2.c now global variable i can be shared with file2.c …

  8. How to share global variables between python files - Python ...

    Dec 13, 2018 · In Python, it is better to use a single module to hold all the global variables you want to use and whenever you want to use them, just import this module, and then you can modify that and it …