import calendar def huto(ev, honap, felir): honaphossz = calendar.monthrange(ev, honap)[1] return [szam - (honaphossz - nap) for nap, szam in felir]