mardi 22 janvier 2019

Python If statement not working as intended

Having trouble figuring out why if statement gives me an invalid syntax error. Tested with prints, prints as intended. Converted to strings and all. any help is appreciated, thanks

import datetime

now = datetime.datetime.now()
today = (str(now.month)+"/"+str(now.day))
xmas ="12/25"

If today == xmas:
    print("Today is xmas!")
Else:
    print("today is not xmas")

Aucun commentaire:

Enregistrer un commentaire