generator_solution.py and test_generator.py

nice use of tuple assignment.