
def my_generator():
    yield 1
    yield 2
    yield 3

gen = my_generator()
print(gen.__next__())  # 1
print(gen.__next__())  # 2
print(gen.__next__())  # 3
print(gen.__next__())  # StopIteration
e6c1fdb7d057dac6ce46d6c67cd5309df6e77502
<mask token>

def my_generator():
    yield 1
    yield 2
    yield 3


<mask token>

def my_generator():
    yield 1
    yield 2
    yield 3


<mask token>
print(gen.__next__())
print(gen.__next__())
print(gen.__next__())
print(gen.__next__())

def my_generator():
    yield 1
    yield 2
    yield 3


gen = my_generator()
print(gen.__next__())
print(gen.__next__())
print(gen.__next__())
print(gen.__next__())


def my_generator():
    yield 1
    yield 2
    yield 3

gen = my_generator()
print(gen.__next__())  # 1
print(gen.__next__())  # 2
print(gen.__next__())  # 3
print(gen.__next__())  # StopIteration