diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2024-09-11 13:55:48 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-09-11 13:55:48 +0200 |
commit | 4c942256f99f82414811c3a7066370124562b80c (patch) | |
tree | 7f43415e61e5f415ed2ec5e00057f0750a621817 /fib.py | |
download | dabeaz_pycon2015_gil-4c942256f99f82414811c3a7066370124562b80c.tar.gz |
https://youtu.be/MCs5OvhV9S4
Diffstat (limited to 'fib.py')
-rw-r--r-- | fib.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -0,0 +1,5 @@ +def fib(n): + if n <= 2: + return 1 + else: + return fib(n-1) + fib(n-2) |