<doocs>1154.Day of the Year_1.py
def dayOfYear( date: str) -> int:
    year, month, day = (int(e) for e in date.split('-'))
    d = 29 if year % 400 == 0 or (year % 4 == 0 and year % 100 != 0) else 28
    days = [31, d, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
    return sum(days[: month - 1]) + day
def sample_funcname ( var_0 : str ) -> int :
    var_6 , var_7 , var_8 = ( int ( var_3 ) for var_3 in var_0.split ( '-' ) )
    var_15 = 29 if var_6 % 400 == 0 or ( var_6 % 4 == 0 and var_6 % 100 != 0 ) else 28
    var_18 = [ 31 , var_15 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 ]
    return sum ( var_18 [ : var_7 - 1 ] ) + var_8
