Use format() instead of %.
Use yield instead of yield from.