I have a file with contents like this (I don't wish to change the contents of the file in any way):
.
.
lines I don't need.
.
.
abc # I know where it starts and the data can be anything, not just abc
efg # I know where it ends.
.
.
lines I don't need.
.
.
I know the line numbers (index) from where my useful data starts and ends. The useful lines can have any unpredictable data. Now I wish to make a list out of this data, like this:
[['a','b','c'],['e','f','g']]
Please note that there are no spaces in between a, b and so on in the input file so i guess the split() function won't work. What would be the best way to achieve this in python?