Utility functions package
Project description
coderutils
A lightweight Python utility package that provides a simple reverse() function for reversing strings and integers.
Features
- Reverse strings
- Reverse positive integers
- Reverse negative integers while preserving the sign
- Beginner-friendly API
- No external dependencies
- Lightweight and fast
Installation
Install the package using pip:
pip install coderutils
Usage
Import the function
from coderutils import reverse
Reverse a String
from coderutils import reverse
print(reverse("Hello Coder"))
Output:
redoC olleH
Reverse a Positive Integer
from coderutils import reverse
print(reverse(12345))
Output:
54321
Reverse a Negative Integer
from coderutils import reverse
print(reverse(-987))
Output:
-789
Supported Input Types
| Input Type | Example | Output |
|---|---|---|
| String | "Hello" |
"olleH" |
| Positive Integer | 12345 |
54321 |
| Negative Integer | -987 |
-789 |
Common Error
If you get:
NameError: name 'reverse' is not defined
you forgot to import the function.
Use:
from coderutils import reverse
before calling reverse().
Example
from coderutils import reverse
print(reverse("Python"))
print(reverse(2025))
print(reverse(-456))
Output:
nohtyP
5202
-654
Project Links
- GitHub Repository: https://github.com/PrabhakarVishwakarma/coderutils
- PyPI Package: https://pypi.org/project/coderutils/
Author
Prabhakar Vishwakarma
License
This project is licensed under the MIT License. Last updated: v0.1.0
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 coderutils-0.1.1.tar.gz.
File metadata
- Download URL: coderutils-0.1.1.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
649369b55c3534e80f569f276b2bd6124efc2cf7955800099f5804747adfa957
|
|
| MD5 |
3ea6817765f06ea8711e509bd40cf507
|
|
| BLAKE2b-256 |
127499e4883bc463dbed831e065edab2808215f163f118609ea64d5960f64145
|
File details
Details for the file coderutils-0.1.1-py3-none-any.whl.
File metadata
- Download URL: coderutils-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18622753cd7d6d9d0d98111c18e4561693b1076c73e18d0d9dbc7215fae9796a
|
|
| MD5 |
4e0b2a40ea7cca3d8dabea0858109a0d
|
|
| BLAKE2b-256 |
6e2618d75e27b32dc0251af5a0ff56136a282d41f264cc5d6d0f28ba4bb5e274
|