+ 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 Answers
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
RKK
RKK - 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
RKK
RKK - avatar