Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 対話モード >>> に
# コピペで実行できます。
class Container:
def __iter__(self):
return Iterator()
class Iterator:
def __iter__(self):
return self
def __next__(self):
raise StopIteration
for element in Container():
print(element)
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.