+ 5
How to convert string "" into list [""] ?
Been making a function that takes a string as an input and make it into a list of words using split() method like that: string_a = "I want to be a coder." list_a = ["I", "want", "to", "be", "a", "coder."] And my problem is, when I call the function this way: my_func("") it will make this [] but I want it to make it this [""] How can I tell python to treat "" as a word and place it into the new list?
3 Respuestas
+ 3
Thanks!
+ 2
here I wrote :
https://code.sololearn.com/cMkC7qZ9TuHJ/?ref=app
let me know what else you want
0
glad I could help you..keep learning.