+ 3
Why doesn't the Python course say anything about commands that convert a string to a list? And can you please name these command
And tell me how to use them.
6 Answers
+ 6
Take a look at this code.
https://code.sololearn.com/ctSczpqaVCo2/?ref=app
+ 5
st ="sololearn is cool"
print(st.split())
#output: ['sololearn', 'is', 'cool']
+ 4
ŠøŠ²Š°Š½ ŠµŃŃ Š¾Š“ŠøŠ½ Š²Š°ŃŠøŠ°Š½Ń
st ="sololearn is cool"
print(list(st))
#output: ['s', 'o', 'l', 'o', 'l', 'e', 'a', 'r', 'n', ' ', 'i', 's', ' ', 'c', 'o', 'o', 'l']
+ 3
rkk Can i "st='cololearn is cool'
st=st.split()
Print(st)"?
+ 3
Thanks guys, you helped me a lot!
+ 1
yes its the same only