
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
string-list
Advanced tools
Tiny but powerful string <-> list manipulation utilities for Python.
string-list is a lightweight Python package designed to help you quickly and cleanly convert between strings, lists, sets, and more. It’s perfect for handling user input, CSV-style values, or transforming semi-structured data with minimal fuss.
str, int, list) and normalize thempip install string-list
Then in your Python code:
from string_list import list_from_string
list_from_string()Split a string into a list with optional trimming:
from string_list import list_from_string
list_from_string("a,b,c") # ['a', 'b', 'c']
list_from_string(" a , b , c ", strip=True) # ['a', 'b', 'c']
list_from_string("1|2|3", delim="|") # ['1', '2', '3']
string_from_list()Join a list or set into a string:
from string_list import string_from_list
string_from_list(['a', 'b', 'c']) # "a,b,c"
string_from_list({'x', 'y'}, quoted=True) # "'x','y'"
string_from_list([1, 2, 3], delim='|') # "1|2|3"
string_from_list(['x', None, 'y']) # "x,y"
list_from_any()Convert a str, int, or list into a list of strings or integers:
from string_list import list_from_any
list_from_any("10,20,30", return_items_as_int=True) # [10, 20, 30]
list_from_any(123) # ['123']
list_from_any(['1', '2']) # ['1', '2']
case_insensitive_update()Merge two sets while ensuring case-insensitive uniqueness and preferring title-case:
from string_list import case_insensitive_update
base = {"Film", "Movie"}
new = {"film", "Cinema"}
case_insensitive_update(base, new) # {'Film', 'Movie', 'Cinema'}
str_enumerate()Enumerate any string/list into a dictionary with string keys (great for config files or JSON):
from string_list import str_enumerate
str_enumerate("apple,banana", start=1)
# {'1': 'apple', '2': 'banana'}
str_enumerate(["x", "y"])
# {'0': 'x', '1': 'y'}
If cloning the repo locally:
pip install -r requirements-dev.txt
pytest tests/
MIT Licensed – free to use, share, and modify.
If you have improvements or new utility functions to add, feel free to open a pull request!
FAQs
Tiny but powerful string <-> list manipulation utilities for Python
We found that string-list demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.