+ 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 ответов
+ 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