Python Utility Functions
This repository contains a collection of utility functions written in Python for various common tasks.
Functions Included:
print_list(list, parse_by_str)
Prints a list with elements separated by a specified string.
list_to_str(list, parse_by_str)
Converts a list to a string with elements separated by a specified string.
delete_all_from_list(lst, item)
Removes all occurrences of a specific item from a list.
num_len(num)
Calculates the length of a number (removing non-digit characters).
flatten_list(lst)
Flattens a nested list into a single list.
item_getter(list, key)
Retrieves values from a list of dictionaries based on specified keys.
transpose(matrix)
Transposes a matrix (list of lists).
retry(func, attempts=3, delay=1, exceptions=(Exception,))
Retries a function multiple times with a delay in case of exceptions.
make_unique(lst)
Removes duplicates while preserving the original order of elements.
make_unique_keep_idx(lst)
Removes duplicates from a list and replaces duplicate elements with an empty string.
merge_dicts(dict1, dict2)
Merges two dictionaries into a single dictionary.
print_dict(dict, parse_by_str)
Prints a dictionary with values separated by a specified string.
dict_to_list(dict)
Converts dictionary values into a list.
dict_to_str(dict, parse_by_str)
Converts dictionary values to a string with elements separated by a specified string.
Feel free to use these functions in your projects or extend them further as needed!
Release files for TQOLU 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| TQOLU-0.1.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| TQOLU-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.7 kB
Release files / TQOLU-0.1.tar.gz
| Download URL | TQOLU-0.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce3e6bc045f8799abe99d12d86f48db770e5e21b480e38d013bb821f54e888be
|
|
BLAKE2b-256 checksum How to use checksums |
11fbd17904d50e2be27b60e50ef62830d8fe9202f97409c572c8e244d1d31626
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|
Release files / TQOLU-0.1-py3-none-any.whl
| Download URL | TQOLU-0.1-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0153f8297755ab8bd3ac97222b377a82ae14b2ddd0951d9b23679a559491a630
|
|
BLAKE2b-256 checksum How to use checksums |
4c67a7124a903d91b0c97d4cffd53e32ac60843c4c60303f4330ee9ff6e561ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|