0
How to split strings ?
What should I do for changing this code↓ str_Hello = input('Say Hello:') to this↓ L_Hello = [ 'H' , 'e' , 'l' , 'l' , 'o' ]
2 Answers
+ 5
str_Hello = input(’Say Hello: ’)
L_Hello = list(str_Hello)
print(L_Hello)
+ 2
You can use:
str.split(separator)
-str: string you're using
strHello = "Hello world"
str = strHello.split()