John Salerno wrote: > 1. repeat indefinitely and have the number of times controlled elsewhere > in the program (e.g., use the morris() generator in a for loop and use > that context to tell it when to stop) > > 2. just make it a function that takes a second argument, that being the > number of times you want it to repeat itself and create numbers in the > sequence
Well, I suppose I could just do: num = 1 for x in range(some_limit): num = morris(num) print num, But that isn't as much of a challenge as the other two options. :) I'd like the function to do all the work of returning multiple numbers (which probably means that option 1 isn't the best either) -- http://mail.python.org/mailman/listinfo/python-list