Python Function Return A Value If Date