Created
July 5, 2024 16:11
-
-
Save 2tony2/f34b73ffb25810074e114cfbff7d162a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def my_generator(): | |
yield 1 | |
yield 2 | |
yield 3 | |
gen = my_generator() | |
for item in gen: | |
print(item) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment