Javascript Leap Year Function Python Format String With Variables