Update 4_decorators.py
This commit is contained in:
parent
67f2ce93e6
commit
4a917f5e8c
1 changed files with 1 additions and 0 deletions
|
@ -26,6 +26,7 @@ def timed(function: any) -> any: #initial function takes in another function as
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
# This is how we call a decorator in python.
|
||||||
@timed
|
@timed
|
||||||
def exponential_function(n: int) -> int: # O(n^2) time complexity due to nested loops
|
def exponential_function(n: int) -> int: # O(n^2) time complexity due to nested loops
|
||||||
output = 0
|
output = 0
|
||||||
|
|
Loading…
Reference in a new issue