in Python by (20.8k points)
How is it possible to share global variables across various modules?

1 Answer

0 votes
by (32.2k points)

In order to share global variables across different modules within a single program, you need to create a special module. After that, just import the config module in all of the modules of your application. This will make the module available as a global variable across all the modules.

Related questions

0 votes
asked May 16, 2020 in Python by Robindeniel (20.8k points)
0 votes
asked Jan 11, 2021 in Python by SakshiSharma (32.2k points)
0 votes
asked Jan 11, 2021 in Python by SakshiSharma (32.2k points)
...