while data:
    curday = days_of_the_week[data.pop(0)]
while data and data[0][0].isdigit():
    business_hours.append({'weekday_name': curday, 'starting_time': data[0],
        'ending_time': data[1]})
data = data[2:]
python algorithm to be done in a pythonic fashion?