Convert Text to a List in Python
Convert String to a List in Python
In order to convert String to a list in Python, we will use the split() method.
All we have to do is to specify the delimiter, in this example, the delimiter is “,”
a = "Hello, LearnDuty!" print(a.split(","))
['Hello', ' LearnDuty!']