Open karunpoudel opened 6 months ago
Just a best practice. It allows to execute code when the file runs as a script, but not when it’s imported as a module (eg. call from another python script)
Created module variable random = Random() instead of overriding the module.
random = Random()
ref: https://realpython.com/if-name-main-python/
Note: hide whitespace changes to view the actual lines modified in the PR
Just a best practice. It allows to execute code when the file runs as a script, but not when it’s imported as a module (eg. call from another python script)
Created module variable
random = Random()
instead of overriding the module.ref: https://realpython.com/if-name-main-python/
Note: hide whitespace changes to view the actual lines modified in the PR