Adding some changes in duty and beginning.py files to respect PEP8