def printSolution(day, part, solution, test=None): if test: print("(TEST) ", end="") print("Solution to day %s, part %s: %s" % (day, part, solution)) if test: print("Expected: %s (%s)" % (test, "correct" if test == solution else "WRONG"))