C
de
S
pace
Explore
Log In
Explore
Sign Up
Log In
jordansilva976
22.05.2026 12:09
0
Stack implementation #23
views.py
def count_words(text): return len(text.split()) print(count_words("hello world foo"))
utils.py
def caesar_cipher(text, shift=3): result = "" for ch in text: if ch.isalpha(): base = ord("A") if ch.isupper() else ord("a") result += chr((ord(ch) - base + shift) % 26 + base) else: result += ch return result print(caesar_cipher("Hello World"))
Idle
Try It
Clear
Log in
to leave a comment
Are you sure you want to delete this post?
Delete
Cancel