Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class Sequence():
def __init__(self):
self.num = 2
def __iter__(self):
return self
def __next__(self):
val = self.num
self.num += 2
return val
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.