3YOURMIND interview question

Refactoring a python script