+ 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.

25th Aug 2020, 12:46 PM
иван
иван - avatar
6 Respostas
25th Aug 2020, 1:03 PM
Charitra
Charitra - avatar
+ 5
st ="sololearn is cool" print(st.split()) #output: ['sololearn', 'is', 'cool']
25th Aug 2020, 12:49 PM
minirkk
minirkk - avatar
+ 4
иван ещё один вариант st ="sololearn is cool" print(list(st)) #output: ['s', 'o', 'l', 'o', 'l', 'e', 'a', 'r', 'n', ' ', 'i', 's', ' ', 'c', 'o', 'o', 'l']
26th Aug 2020, 7:28 PM
Konstantin K
Konstantin K - avatar
+ 3
rkk Can i "st='cololearn is cool' st=st.split() Print(st)"?
25th Aug 2020, 12:52 PM
иван
иван - avatar
+ 3
Thanks guys, you helped me a lot!
25th Aug 2020, 1:08 PM
иван
иван - avatar
+ 1
yes its the same only
25th Aug 2020, 12:53 PM
minirkk
minirkk - avatar