Tag: Python Generator

March 21, 2018

Instead of returning a single value, a function can generate an entire sequence of results if it uses the yield statement. A generator is almost exactly the same as a plain function and it can be used in exactly the same way as an iterator(something that we can iterate on). There is one definite sign […]

Continue Reading