For example if it is ["aba"]
how do I break it into ["a", "b","a"]
?
Asked
Active
Viewed 32 times
0
-
2Just call `list("aba")`. – csabinho Nov 11 '19 at 00:06
-
6Does this answer your question? [How to split a string into array of characters?](https://stackoverflow.com/questions/4978787/how-to-split-a-string-into-array-of-characters) – MrCorote Nov 11 '19 at 00:07
2 Answers
1
One of many possible ways:
lst = ["aba"]
result = [char for char in lst[0]]
print(result)

Jan
- 42,290
- 8
- 54
- 79