I have the following codes:
if date in (start, end):
print 'in between'
As you are still not satisfied, I have another answer for you. Without using datetime and year.
It just uses built-in tuples and comparing them:
d1 = (3, 28) d2 = (3, 31) d3 = (4, 2) if d1 < d2 < d3: print("BETWEEN!") else: print("NOT!")
You can create tuple like these easily:
day = 16 month = 4 d = (month, day)