A beginner-friendly collection of small but useful Python tools. Think of it like Batmanβs belt β a set of little gadgets you can pull out whenever needed.
- Simple string helpers (reverse, palindrome check, etc.)
- Basic math helpers (factorial, prime checker, etc.)
- Easy to read, easy to learn from
- Each function comes with examples & docstrings
utils/
βββ string_tools.py
βββ math_tools.py
βββ file_tools.py
tests/
βββ test_string_tools.py
βββ test_math_tools.py
from utils.string_tools import reverse_string, is_palindrome
from utils.math_tools import factorial, is_prime
print(reverse_string("hello")) # 'olleh'
print(is_palindrome("madam")) # True
print(factorial(5)) # 120
print(is_prime(7)) # Truepython -m unittest discover testsWant to add your own gadget to the belt?
- Fork the repo
- Add your function in
utils/ - Write a test in
tests/ - Open a pull request
MIT License β free to use, share, and modify.