How can I convert a string into a list? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

How can I convert a string into a list?

3rd Sep 2021, 8:54 PM
Tarawo Blessing
3 Réponses
+ 7
a="hello" print(list(a)). you can use split method as well in case you want to split the string based on some character.
3rd Sep 2021, 9:01 PM
Abhay
Abhay - avatar
+ 2
Runtime Terror you missed the immutability part ;)
4th Sep 2021, 1:59 AM
Hima
Hima - avatar
4th Sep 2021, 4:41 PM
Tarawo Blessing