I have a list that I want to split up a bit more, but the output for the data is such that I can't keep it in a good format. Below is an example of what I'm doing
data = ['x', '10[mm]', 'y', '15[mm]']
Data = [data.split('[') for item in data]
Output => Data = ['x', '10', 'mm]', 'y', '15' 'mm]']
And I'm looking to get the output to show
Data = ['x', '10', '[mm]', 'y', '15', '[mm]']
I've seen scripts that keep the delimiter by doing the following and re.split, but I don't know how I could implement this into what I have so far
d = ">"
for line in all_lines:
s = [e+d for e in line.split(d) if e]