def printSolution(day, part, solution, test=None, test_case=0): if test is not None: print( "(TEST case%d/day%d/part%d) -- got '%s' -- expected '%s' -> %s" % (test_case, day, part, solution, test, "correct" if test == solution else "WRONG") ) else: print("Solution to day %s, part %s: %s" % (day, part, solution))