+ 1

Is there any way to split a text in Python with ""? In JS: "Hello".split("") >> ["H","e","l","l","o"] in Python: doesn't work :(

text = "hi" {code} >> Output: ["h","i"]

18th Oct 2019, 4:34 PM
Csongor Kertesi
Csongor Kertesi - avatar
2 ответов
+ 10
print(list("hi"))
18th Oct 2019, 4:36 PM
Hatsy Rei
Hatsy Rei - avatar