Choosing how to spend the days

from collections import namedtuple Condition = namedtuple('Condition', """ sunny, windy, rainy, snowy, warm, strong_wind, high_rain_intensity, slippery_surfaces, needs_to_travel, travel_distance_long, in_good_company, walking_preferred, walked_enough, near_local, local_prices_affordable, local_overcrowded, local_allows_smoking, sat_enough """) days = [ Condition( True, False, True, False, True, False, False, False, True, False, True, True, False, False, False, False, False, False ), Condition( False, True, True, False, True, False, False, False, False, False, True, True, False, False, False, False, False, False ), Condition( True, False, False, False, True, False, False, False, False, False, True, True, False, True, True, False, False, False ), Condition( True, False, False, False, True, False, False, False, False, False, True, True, True, True, True, False, False, False ), ] day_num = 1 for day in days: walking = False sitting = False sunny, windy, rainy, snowy, warm, strong_wind, high_rain_intensity, slippery_surfaces, needs_to_travel, travel_distance_long, in_good_company, walking_preferred, walked_enough, near_local, local_prices_affordable, local_overcrowded, local_allows_smoking, sat_enough = day if warm and (sunny or (rainy and not high_rain_intensity)) and not windy and not snowy: if not needs_to_travel or (needs_to_travel and not travel_distance_long): if in_good_company: if walking_preferred: walking = True sitting = False if walked_enough: if near_local and local_prices_affordable and \ not local_overcrowded and not local_allows_smoking: walking = False sitting = True if sat_enough: walking = True sitting = False print('Day %d:' % (day_num)) print('Walking: %s' % (walking)) print('Sitting: %s\n' % (sitting)) day_num += 1 """ Day 1: Walking: True Sitting: False Day 2: Walking: False Sitting: False Day 3: Walking: True Sitting: False Day 4: Walking: False Sitting: True """