Adds many utilities for easy Python coding.
Project description
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!
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 TQOLU-0.1.tar.gz.
File metadata
- Download URL: TQOLU-0.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce3e6bc045f8799abe99d12d86f48db770e5e21b480e38d013bb821f54e888be
|
|
| MD5 |
dee33370fa3d1480d86b8ec989882993
|
|
| BLAKE2b-256 |
11fbd17904d50e2be27b60e50ef62830d8fe9202f97409c572c8e244d1d31626
|
File details
Details for the file TQOLU-0.1-py3-none-any.whl.
File metadata
- Download URL: TQOLU-0.1-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0153f8297755ab8bd3ac97222b377a82ae14b2ddd0951d9b23679a559491a630
|
|
| MD5 |
f3096abc1134e4f53dbefbc4e6ea9459
|
|
| BLAKE2b-256 |
4c67a7124a903d91b0c97d4cffd53e32ac60843c4c60303f4330ee9ff6e561ca
|