Use the ast module

>>> import ast
>>> list_as_string = "['item 1', 'item 2', 'item 3']"
>>> _list = ast.literal_eval(list_as_string)
>>> _list
['item 1', 'item 2', 'item 3']
>>>
Answer from C.B. on Stack Overflow
🌐
Reddit
reddit.com › r/learnpython › split string to list without split method
r/learnpython on Reddit: Split string to list without split method
December 25, 2021 - If you want to split a string "manually", you'll need to walk the string using a loop, and then do something like when you find the character to split on, add the previous characters to a list, then join the list to get each piece.
Python list() vs split() Apr 22, 2021
r/AskProgramming
5y ago
from list of strings to list of lists Mar 13, 2021
r/learnpython
5y ago
How do I manipulate string values inside a list? Mar 30, 2023
r/learnpython
3y ago
More results at reddit.com
Discussions

python - string to list and list to string conversion - without split - Stack Overflow
Could you share how to convert string to list and vice versa as shown below (without splitting each words) Input: string 'I am a boy' Output: ['I am a boy'] and Input: list ['I am a boy'] Output: More on stackoverflow.com
🌐 stackoverflow.com
python - Convert string (without any separator) to list - Stack Overflow
I have a phone number(string), e.g. "+123-456-7890", that I want to turn into a list that looks like: [+, 1, 2, 3, -, ...., 0]. Why? So I can go iterate through the list and remove all the symbol... More on stackoverflow.com
🌐 stackoverflow.com
Python: how to split string without .split and making it a list
I don't see why you don't wanna use split but you could iterate over the characters until you hit space. More on reddit.com
🌐 r/learnprogramming
8
4
December 11, 2021
How to convert string to list (NOT list(str), it is how to make list(' "a", 1, 3 )') work)
API? Parse the response as JSON. More on reddit.com
🌐 r/learnpython
5
3
May 24, 2022
🌐
Python Guides
pythonguides.com › convert-string-to-list-in-python-without-using-split
Convert String to List in Python Without Using Split
May 16, 2025 - The simplest way to convert a string to a list without using split() is to use the Python built-in list() function.
🌐
Quora
quora.com › How-do-I-convert-a-string-to-a-list-without-splitting-in-Python
How to convert a string to a list without splitting in Python - Quora
Answer (1 of 2): Your homework is answered! [code]def string_parts(s, n=" "): t = "" l = [] for i in s: if i == n: l.append(t) t = "" else: t += i if t: l.append(t) return l in_string = "For £10 pounds you can get $20, in my dreams!" l_string = string_parts(in_string) pri...
🌐
YouTube
youtube.com › algogpt
Python String to list without split - YouTube
Download this code from https://codegive.com Title: Python Tutorial: Converting a String to a List Without Using the split() MethodIntroduction:In Python, co...
Published   November 29, 2023
Views   12
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › python-program-convert-string-list
Convert string to a list in Python - GeeksforGeeks
Explanation: [ch for ch in s] with this list comprehension we iterate over each character (ch) in the string "s" and add it to the list. ... Python provides built-in type conversion functions to easily transform one data type into another. This article explores the process of converting objects into strings which is a basic aspect of Python programming.Since every element in Python is an object, we can use the built-in str() and repr() m
Published   May 5, 2025
🌐
SourceTrail
sourcetrail.com › home › python › solved: python string to list without split
Solved: string to list without split in Python - SourceTrail
September 11, 2023 - Python String to List Without Split is a powerful tool that can help you easily convert a list of strings into a list of lists.
🌐
AskPython
askpython.com › home › convert string to list in python
Convert String to List in Python - AskPython
January 16, 2024 - What if we need a list of characters present in a string? In that case, direct type conversion from string to list in Python using the list() method does the
🌐
DigitalOcean
digitalocean.com › community › tutorials › python-convert-string-to-list
How To Convert a String to a List in Python | DigitalOcean
April 9, 2026 - In Python, strings and lists are two fundamental data structures often used together in various applications. Converting a Python string to a list is a common operation that can be useful in many scenarios, such as data preprocessing, text analysis, and more.
🌐
Reddit
reddit.com › r/learnpython › how to convert string to list (not list(str), it is how to make list(' "a", 1, 3 )') work)
r/learnpython on Reddit: How to convert string to list (NOT list(str), it is how to make list(' "a", 1, 3 )') work)
May 24, 2022 -

Given I have the following string

a = '["b", "s", 1]'

How would I convert it to an actual list? (If I do print(type(a)) it will say <class 'str'>, but I want to print <class 'list'> )

One way would be to use a for loop with string.split(',') along with a small bit of processing to remove the brackets and stuff. but I have some reasons (more like assumptions) for not doing so:

  1. I might be working on a LONG list per user which is already pretty slow, and maybe, just maybe, if I get alot of requests from my API it might really slow down the processing. (I have to remove duplicates too after this, I can't do OrderedSet(list) because it won't keep the insertion order.)

  2. I am going to be hosting this on Heroku (its a flask API and well this might FURTHER slow down the processing).

The above reasons are really my assumptions, not really researched reasons (so they might be incorrect)

So what is an efficient, fast way to do this on a flask server (even if the list is long)? Could somehow numpy arrays help me? ( it will be between 250-500 items)

🌐
EyeHunts
tutorial.eyehunts.com › home › python split string | without split() function
Python split String | Without split() Function - EyeHunts
May 18, 2021 - sentence = 'Python Programming tutorial' split_value = [] tmp = '' for c in sentence: if c == ' ': split_value.append(tmp) tmp = '' else: tmp += c # for last word if tmp: split_value.append(tmp) print(split_value) Output: [‘Python’, ‘Programming’, ‘tutorial’] Output in Python List (Array for other programming languages) format? Use a loop to get in string format or get a single word by using indexing.
🌐
AskPython
askpython.com › home › python – convert string to list
Python - Convert String to List - AskPython
June 21, 2021 - Python’s ast (Abstract Syntax Tree) module is a handy tool that can be used to deal with strings like this, dealing with the contents of the given string accordingly. We can use ast.literal_eval() to evaluate the literal and convert it into a list.
🌐
Pluralsight
pluralsight.com › blog › software development
6 Best Methods for Python String to List Conversion | Pluralsight
As strings and lists are two of the most popular data types in Python, it’s likely you’ll come across situations where you need to convert a list to a string (or vice versa) so you can access and apply functionality specific to those data types. In this tutorial, I’ll show you six tried-and-true methods to convert strings into lists in Python.
🌐
IONOS
ionos.com › digital guide › websites › web development › converting python strings to lists
How to convert a Python string to a list - IONOS
December 12, 2024 - There are various methods for converting Python strings to lists. Find out the different ways to convert strings into lists in this tutorial.
🌐
Python Guides
pythonguides.com › python-string-to-list
How To Convert String To List In Python?
April 3, 2025 - If a string represents a nested JSON structure, a simple .split() won’t work. Instead, Python json.loads() can parse it into a dictionary.