new_contents: def reduce_by_rules(lst, rules):
      new = list(lst)
      while True:
          for rule in rules:
              new = [rule(new.pop(0),new.pop(0))] + new
              if len(new) == 1: return new[0]
  
subject: Create 6kyu_reducing_by_rules_to_get_the_result.py