-
-
Save esenthil2018/47c6616a69ff906b494278cb2a9e1101 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| from functools import lru_cache | |
| @lru_cache() | |
| def factor(n): | |
| print('Factor{0}!'.format(n)) | |
| return 1 if n < 2 else n * factor(n-1) | |
| factor(5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment