[Community Puzzle] How time flies : Hardcoded solutions?

Hey, here is my ugly python code:
I’m passing all the first tests, but it seems like i have hardcoded something ?

I tried something about the 29.02.2016 => 28.02.2017.
I know there is a better way to write, but i’m beginning with python :frowning:

Could someone give me a hint on what’s wrong ?

import sys
import math

# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.

begin = input().split('.')
end = input().split('.')
def bissextile(year):
    if (not year%4 and year%100) or not year%400:
        return True
    return False
m31=[1,3,5,7,8,10,12]
m30=[4,6,9,11]


d1 = int(begin[0])
d2 = int(end[0])
m1 = int(begin[1])
m2 = int(end[1])
y1 = int(begin[2])
y2 = int(end[2])
d=0
m=0
y=0
if d1==29 and m1==2 and d2==28 and m2==2:
    d1=28
    y1+=1
    m=+11
    d+=365
i=0
if m1 in m31:
    i=31
elif m1 in m30:
    i=30
else:
    if bissextile(y1):
        i=29
    else:
        i=28
while(d1!= d2):
    d1+=1
    d+=1
    if d1 > i:
        d1%=i
        m1+=1
        if m1>12:
            m1%=12
            y1+=1
while(m1!=m2):
    j=0
    if m1 in m31:
        j=31
    elif m1 in m30:
        j=30
    else:
        if bissextile(y1):
            j=29
        else:
            j=28
    m1+=1
    m+=1
    d+=j
    if m1==13:
        m1%=12
        y1+=1
while(y1!=y2):
    if bissextile(y1):
        d+=366
    else:
        d+=365
    y1+=1
    y+=1

if y>1:
    print(f'{y} years, ', end='')
elif y==1:
    print(f'{y} year, ', end='')
if m>1:
    print(f'{m} months, ', end='')
elif m==1:
    print(f'{m} month, ', end='')
print(f'total {d} days')

Try this testcase:

01.04.2000
01.04.2001
01.04.2000
01.04.2001
1 year, total 366 days

ah. Right
Thx