Dec-10-2019, 02:31 PM
If I look how file is structured - isin't it simpler to drop all rows until first empty row is encountered and do something with remaining rows? Something like:
with open('books_test.txt', 'r') as f: for row in f: if row in ['\n', '\r\n']: break for row in f: # do something
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.