Created
August 9, 2021 04:53
-
-
Save Rustam-Z/67b8aac7b59a8ea5324c5c7cc451f185 to your computer and use it in GitHub Desktop.
Makes the infinite sequence using generator.
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 infinite_sequence(): | |
"""Makes the infinite sequence with Python generator. | |
""" | |
num = 0 | |
while True: | |
yield num | |
num += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment