Steven D'Aprano <steve at REMOVETHIScyber.com.au> writes: > What techniques do others use? I'd just write the generator with a yield statement. The generator expression does the same thing more concisely, I think.