I added a if name == "main": guard to ensure that the script's main functionality is only executed when the script run directly, not when it's imported as a module.
I replaced the use of args in the global scope with function parameters, making the code more modular and easier to understand.
I added a if name == "main": guard to ensure that the script's main functionality is only executed when the script run directly, not when it's imported as a module.
I replaced the use of args in the global scope with function parameters, making the code more modular and easier to understand.