Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Advanced Python Mastery – A Course by David Beazley. Parent comment
[... for row in open(filename).readlines()]
[... for row in open(filename)]
Additionally, this doesn't do what you think it does:
>>> header, *records = (row.strip().split(',') for row in f)
>>> gen = (row.strip().split(',') for row in f) >>> header, *records = next(gen)
There are no comments on this comment yet.
Additionally, this doesn't do what you think it does:
Compare to this, using a variable for clarity: