You are working on a Python project with several modules, and you need to make some global configurations accessible across all modules. How would you achieve this?

  • a) Use global variables
  • b) Use the configparser module
  • c) Use function arguments
  • d) Use environment variables
To make global configurations accessible across multiple modules, it's a good practice to use the configparser module. It allows you to store configuration settings in a separate configuration file and read them from different modules. This promotes modularity and maintainability.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *