simpler, cleaner and more pythonic generator

generators like this are faster and less memory-consuming than loop + concatenation