From 4b4180a8f65a74541e46e4c680eb968ff1fd7599 Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Sun, 29 Mar 2009 18:12:43 -0500 Subject: [PATCH] fixed __main__ block --- examples/alphametics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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.