regex - Python - extract lines between multiple instances of the same delimiter -
i have file this
=== aa bb === aa cc dd == 11 i need extract lines between "===" , put them in different variables (a list maybe).
can please me? thank you
with open('input.txt') input_file: result = input_file.read().split('===\n') print result
Comments
Post a Comment