Javascript End A Function Python Format Print Decimal Places