I have this simple file:
1|2|234 A=Jim 33
1|2|765 A=Sam 44
1|2|561 A=Edy 55
I want to parse the file to get the following output:
["1","2","Jim 33"]
["1","2","Sam 44"]
["1","2","Edy 55"]
I tried to split by "|", but the problem I am facing is how to split by "A=" or how to make the program recognizes "A=" and prints what is after it.
The algorithm that I have in mind is to iterate through each split item and check if the item contains the character "A=". Not sure how to translate that into python code. Any pythonic idea?