Update default.py

Removed duplicate code.