saving . . . saved split all letters of a word has been deleted. split all letters of a word has been hidden .
split all letters of a word
Title
Question
How to split the string "Hello" to obtain individual alphabets?

Python-3.4.3 Getting-started-with-strings 00-01 min 0-10 sec 22-06-19, 4:59 p.m. Petta

Answers:

list("Hello")
22-06-19, 5:08 p.m. iakashchavan
Isn't possible with split command?
22-06-19, 5:33 p.m. Petta
Without space in the alphabets/words i think this could not possible to split.
30-04-20, 11:50 p.m. digambargunjal28@gmail.com

Login to add comment


Yes, it is possible. 
Firstly, store the word Hello into a variable as shown: s="Hello"
Secondly, use the function split as shown: print(s.split())
14-03-20, 8:30 p.m. rajdeep4ever2010@gmail.com
without split also you can do it.

In [25]: x="hello"

In [26]: x[0]
Out[26]: 'h'

In [27]: x[1]
Out[27]: 'e'

In [28]: x[2]
Out[28]: 'l'

In [29]: x[3]
Out[29]: 'l'

In [30]: x[4]
Out[30]: 'o'
27-06-20, 7:57 p.m. swati-mishra
In [31]: list("hello")
Out[31]: ['h', 'e', 'l', 'l', 'o']
27-06-20, 8:04 p.m. swati-mishra

Login to add comment


Log-in to answer to this question.