Split a String Into a List in Python

Learn how to split a string into a list in Python

Luay Matalka
Geek Culture
Published in
2 min readJul 31, 2021

--

Photo by Alex Chumak on Unsplash

Split a Single String Into a List

We can make a list of strings from a single string using the split method:

str.split(sep=None, maxsplit=-1)

str is the string that will be split or used to create the list. sep is the…

--

--

Luay Matalka
Geek Culture

Lead Machine Learning Engineer, specializing in MLOps, with a passion for teaching.