C
de
S
pace
Explore
Log In
Explore
Sign Up
Log In
haydennakamura780
22.05.2026 11:34
0
Guess the number
Ideas welcome
app.py
import random def gen_password(length=12): chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%" return "".join(random.choice(chars) for _ in range(length)) print(gen_password())
helper.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