Another possible solution, without itertools:
>>> with open('field.txt', 'r') as quotes: ... for i, v in enumerate(quotes.readlines()): ... if i == 4: ... print(v) ... break # if line 5 reached you don't want iterate anymore ... It should be pretty simple, since you only know the basics so far.I should be pretty much in line with your original syntax.
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.