a = [id(row) for row in r]
r = csv.reader(open('foo.csv'))
b = [row for row in r]
b_id = [id(row) for row in b]
c1 = Counter(a)
c2 = Counter(b_id)
print(c1)
print(c2)
With python csv module, why does creating a list of identical values speed up creation of a list of rows?