C
de
S
pace
Explore
Log In
Explore
Sign Up
Log In
nicokim735
22.05.2026 11:41
1
Tic-tac-toe
Just for fun
algo.py
def max_in_list(lst): m = lst[0] for x in lst: if x > m: m = x return m print(max_in_list([3, 7, 1, 9, 4]))
config.py
def memoize(fn): cache = {} def wrapper(*args): if args not in cache: cache[args] = fn(*args) return cache[args] return wrapper @memoize def expensive(n): return sum(range(n)) print(expensive(1000000))
Idle
Try It
Clear
Log in
to leave a comment
Are you sure you want to delete this post?
Delete
Cancel