Javascript Leap Year Function Python Syntax For In Range