I am trying to split a text into several lists. I have tried several ways, but I had no success.
Here is an example:
text_1 = "A-0 100 20 10 A-1 100 12 6 A-2 100 10 5"
The result I would like to have is the following:
[['A-0', '100', '20', '10'], ['A-1', '100', '12', '6'], ['A-2', '100', '10', '5']]
I used regex to identify A-
as a delimiter for the split. However, I am struggling splitting it. Maybe there is a better way to solve this?
This is just an example, since the solution I am using for a PDF data extractor I managed to built.