diff --git a/examples/alphametics.py b/examples/alphametics.py index 80dbf1b..3d5c505 100644 --- a/examples/alphametics.py +++ b/examples/alphametics.py @@ -28,7 +28,8 @@ if __name__ == '__main__': import sys for puzzle in sys.argv[1:]: print(puzzle) - for solution in solve(puzzle): + solution = solve(puzzle) + if solution: print(solution) # Copyright (c) 2009, Raymond Hettinger, All rights reserved.