0

For example if it is ["aba"] how do I break it into ["a", "b","a"]?

Jan
  • 42,290
  • 8
  • 54
  • 79
  • 2
    Just call `list("aba")`. – csabinho Nov 11 '19 at 00:06
  • 6
    Does 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 Answers2

1

One of many possible ways:

lst = ["aba"]
result = [char for char in lst[0]]
print(result)
Jan
  • 42,290
  • 8
  • 54
  • 79
1

If it is always from 1st element of the list:

splits = [i for i in a[0]]