Review syntax and python generator