how to convert a string in a list using python? code example
Example 1: python convert string to list
fruit = 'apple oranges banans'
newlist = fruit.split()
print(newlist)
Example 2: string to list python
s = 'hello'
l = list(s)
print(l) # prints ['h', 'e', 'l', 'l', 'o']