I want to split a value in a list and make it two values.
arr = [10]
The array should turn in to:
arr = [1,0]
Use list comprehension with two iterations:
>>> [int(x) if x.isdigit() else x for y in arr for x in str(y)] [1, 0] >>>