My package to convert str-list and list-str.
Project description
ListTransformer
Installation
pip install ListTransformer
Examples
import ListTransformer
liste = ListTransformer.lister("123 123 123")
print(liste)
print(ListTransformer.str_list(liste))
lister
- (required) str_list:
strthe text to convert to list - (optional) typ:
lister.Typthe method for example comma or space, default is that it is selected automatically- Attributes
ListTransformer.Typ.auto, ListTransformer.Typ.comma, ListTransformer.Typ.spacethe input format
- Attributes
Example
import ListTransformer
print(ListTransformer.lister("123 123 123"))
print(ListTransformer.lister("123, 123, 123"))
First and secend Output
['123', '123', '123'] as list
str_list
- (required) list:
listThe list to be converted into a string - (optional) split:
lister.SplitsThe way in which the string should separate the entries- Attributes
ListTransformer.Splits.space, ListTransformer.Splits.commathe output format
- Attributes
Example
import ListTransformer
liste = ["test1", "test2", "test3"]
print(ListTransformer.str_list(liste))
print(ListTransformer.str_list(liste, ListTransformer.Splits.space))
Outputs
test1, test2, test3 as string
test1 test2 test3 as string
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
listtransformer-0.1.9.tar.gz
(2.5 kB
view details)
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 listtransformer-0.1.9.tar.gz.
File metadata
- Download URL: listtransformer-0.1.9.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c17025b764de36dafdd6c1d2fc2dae553378f8786850514ba39d9b935572a5e4
|
|
| MD5 |
565fcc31088490dd89872b8c7cbe6e83
|
|
| BLAKE2b-256 |
bae6db792b641b4853447e7ae45a4f11ebe9783f161a79104fbf50f1a04f82dc
|
File details
Details for the file listtransformer-0.1.9-py3-none-any.whl.
File metadata
- Download URL: listtransformer-0.1.9-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abe75ea8fa614151fb013b927f8cba9f5d14e02dab59de8fc61515ceceebb3be
|
|
| MD5 |
6bd311b48d24bae260897974507cfb61
|
|
| BLAKE2b-256 |
48f4375b584d0812f9d995d1490a8e43161b0659958754b57b57ee51cd6ec3f5
|