Skip to content

Instantly share code, notes, and snippets.

@wulab
Created December 21, 2021 10:24
Show Gist options
  • Save wulab/c0c432b89b9dae8f86156b394b6b8b49 to your computer and use it in GitHub Desktop.
Save wulab/c0c432b89b9dae8f86156b394b6b8b49 to your computer and use it in GitHub Desktop.
def divide(n, d):
while True:
yield n // d
n = (n % d) * 10
def next_n(n, g):
return [next(g) for _ in range(n)]
def input(number):
pi = divide(355, 113)
return next_n(number, pi)
print(input(number=3))
print(input(number=10))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment