problem_2.py : Removed redundant code