Update schedule3.py

Optimization by Nyle.