Python Loop file after match found and stop

Published: 14/01/2019
Python Loop file after match found and stop
Source: STACKOVERFLOW.COM

I have a file that I need to parse. Example of the file: define_cell \ -input { A B CI } \ -output { CO S } \ A define_cell \ -input { A X CI } \ -output { CO S } \ B The clause start with 'define_cell' and and the continuous of line defined by \ and end with the with no \ i am trying to parse the file and create dict A ->input->[A, B, CI], A ->output->[CO,S] B ->input->

Read more
Related news
Comment
FACEBOOK