Generatorobject is returned by a generator function and it conforms to both the iterable protocol and the iterator protocol.
()method returns an object with two properties
value. You can also provide a parameter to the
nextmethod to send a value to the generator.
return()method returns the given value and finishes the generator.