pythonbeginner
Fibonacci Yield Generator
Memory-efficient Python generator yielding Fibonacci numbers
By ApeType Staff·7 lines·135 characters·1,420 total attempts
def fibonacci_stream(limit: int):
a, b = 0, 1
count = 0
while count < limit:
yield a
a, b = b, a + b
count += 1
TRANSCRIBE
Ready when you are.
Test your muscle memory and transcription speed against this exact snippet.
Start Typing
Tip: Press Esc anytime to restart
Best runs on this snippet
| # | Typist | Acc | WPM |
|---|---|---|---|
| 1 | nypava | 100% | 104 |
| 2 | nypava | 100% | 104 |
| 3 | nypava | 100% | 104 |
| 4 | Abel Gideon | 100% | 98 |
| 5 | Abel Gideon | 100% | 98 |