For an exercise, I'm supposed to write a function with two dates as variable inputs and compare them. However, whatever way I try to define the function, it gives me an invalid syntax.
I'm trying to do something like this:
from datetime import date
def birthday(date(year1, month1, day1), date(year2, month2, day2)):
party = False
if month1 == month2 and day1 == day2:
party = True
return party
It is intended that the function be called like this:
birthday(date(1969, 10, 5), date(2015, 10, 5))