A beginner-friendly utility module with handy math, string, and list functions
Project description
HandyUtils
HandyUtils is a beginner-friendly Python module that offers a rich collection of everyday utility functions — all in one place!
Perfect for beginners, students, and anyone who’s tired of writing the same helper code again and again.
✨ Features
-
🔢 Math Utilities
factorial(n)– Calculates the factorialfibonacci(n)– Generates Fibonacci seriesis_prime(n)– Checks for prime numbersis_armstrong(n)– Armstrong number checkersum_of_digits(n)– Sum of digitsgcd(a, b)andlcm(a, b)– Find GCD and LCM
-
🔤 String Utilities
is_palindrome(s)– Palindrome checkerreverse_string(s)– Reverses a stringtoggle_case(s)– Switch case of all characterscount_vowels(s)– Counts the number of vowelsare_anagrams(s1, s2)– Anagram checker
-
🔁 Conversion Utilities
decimal_to_binary(n)binary_to_decimal(b)decimal_to_hex(n)hex_to_decimal(h)
-
📋 List Utilities
find_duplicates(lst)– Detects duplicate valuesflatten_list(nested_list)– Flattens nested listschunk_list(lst, chunk_size)– Splits lists into chunks
📦 Installation
Install it via pip command
pip install handyutils
🚀 Usage Example
python
Copy code
from handyutils import factorial, is_palindrome, fibonacci, is_prime
print(factorial(5)) # Output: 120
print(is_palindrome("madam")) # Output: True
print(fibonacci(6)) # Output: [0, 1, 1, 2, 3, 5]
print(is_prime(13)) # Output: True
📚 Full Function List
is_palindrome(s)
factorial(n)
fibonacci(n)
is_prime(num)
gcd(a, b)
lcm(a, b)
sum_of_digits(n)
is_armstrong(n)
reverse_string(s)
toggle_case(s)
count_vowels(s)
are_anagrams(s1, s2)
decimal_to_binary(n)
binary_to_decimal(b)
decimal_to_hex(n)
hex_to_decimal(h)
find_duplicates(lst)
flatten_list(nested_list)
chunk_list(lst, chunk_size)
🙋♀️ Author
Created with ❤️ by Prathiksha J
GitHub: @prathikshaj1203
📝 License
This project is licensed under the MIT License – see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pypocketutils-0.1.0.tar.gz.
File metadata
- Download URL: pypocketutils-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d13f5020cc31d92d913c198e61f1b90b431be872962f3caab3fc019b9fac7b9
|
|
| MD5 |
4a373896619e96296287307d95fb4752
|
|
| BLAKE2b-256 |
73c77831ec590a1cd7bcc784a7288f457df8d974ea7229afc7e5c553f72942ab
|
File details
Details for the file pypocketutils-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pypocketutils-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
434ff17b8e5623b8374056b74fde16abbebf4e35663ed91f405e2c284a5db7c2
|
|
| MD5 |
9db5dbe09bb7c9547ffa5460de7ae114
|
|
| BLAKE2b-256 |
bf056e9a5c5a002b604bcd0f37a5832937f335be6e00abd0668db2f406d9c714
|