days=[day for day in range(1,32)] count=0 count_list=[] for day in days: if day<=12: count+=1 count_list.append(day) else: sum=day//10+day%10 if sum<=12: count+=1 count_list.append(day) print(count)