Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Fibonacci plain

  • We don't call this as this has an infinite loop
def fibonacci():
    a, b = 0, 1
    while True:
        a, b = b, a+b

# fibonacci()