convert string to list python

Solutions on MaxInterview for convert string to list python by the best coders in the world

showing results for - "convert string to list python"
Laetitia
07 May 2020
1# To split the string at every character use the list() function
2word = 'abc'
3L = list(word)
4L
5# Output:
6# ['a', 'b', 'c']
7
8# To split the string at a specific character use the split() function
9word = 'a,b,c'
10L = word.split(',')
11L
12# Output:
13# ['a', 'b', 'c']
Laura
02 Sep 2018
1fruit = 'apple oranges banans'
2newlist = fruit.split()
3print(newlist)
Maria José
19 Jun 2019
1word = "Hey Hello world"
2print(list(word))
3# output
4# ["Hey", "Hello", "world"]
queries leading to this page
how to convert string to list pythonstring as list pythonmake list from string pythonconverting string to list pythonpython turn string into liststring to list in pythonconvert a string to listpytohn covnert string to listhow to convert a string to into array in pythonpython parse array string to listturn a string into a list pythonhow to convert string into list in pythonconvert string to array in pythonconvert string with 2c to listhow to convert string to list in pythonhow to convert a string to listconvert string into a list pythonstring into liststr to list in pythonconvert a string to a listhow to convert string into listconvert a string to list in pythonturn string into list pythonhow to convert a string to a list in pythonhow to change a string into a listpython how to turn a string into a listhow to convert a string into list in pythonchange string to list pythonfrom string to list pythonpython string to list functionstring to array pythonpython convert string to list convert string into list pythonhow to cast string to list in pythonstore a string in a list pythonhow to convert a string into a list in pythonturn a string toa list pythonconvert string python to liststrings to list in pythonstring to list pyrhonpython str to listsplit and not convert into list pythontransform a string into a list pythonstring to python listparse string to list pythonhow to convert string to python listconvert string to listpython str to list 2cpython string into liststring to list pythonconver string to list pythonhow to make a string to list in pythonpython string to listconvert string in list pythoncreate a list from string pythonconvert string to list pythonchanging a string to a list pythonstring convert to list pythonconvert string to list in pythonconvert str into list pythoncast string to list pythonhow to convert string to listpython parse string array to listhow to convert a string to list in pythonpython list from stringone string to list pythonconvert string to array pythonhow to turn a string into a listconvert string to a list in pythonhow to convert str into liststring to listhow to convert a string into listhow to convert string in list in pythonconvert string to list pythonpython parse string to liststr to list pythonpython change from string to listconvert string to list python