Python Developer Question:

How to share global variables across modules?

Tweet Share WhatsApp

Answer:

To share global variables across modules within a single program, create a special module. Import the config module in all modules of your application. The module will be available as a global variable across modules.

Download Python Developer PDF Read All 77 Python Developer Questions
Previous QuestionNext Question
Please explain in Python what is slicing?Tell me the use of // operator in Python?