How to split an element into symbols? (Python) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to split an element into symbols? (Python)

Example: a=[‘hello’] ... #output [‘h’, ‘e’, ‘l’, ‘l’, ‘o’]

22nd Oct 2019, 9:43 PM
Syrex
Syrex - avatar
3 Answers
+ 3
print(list(a))
22nd Oct 2019, 10:03 PM
A͢J
A͢J - avatar
+ 2
In this situation: print(list(a[0]))
22nd Oct 2019, 9:52 PM
HonFu
HonFu - avatar
+ 1
Thanks everyone;)
23rd Oct 2019, 5:09 AM
Syrex
Syrex - avatar