Javascript Leap Year Function In Python Def