Skip to content

Instantly share code, notes, and snippets.

@bklaas
Last active March 1, 2024 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bklaas/c2f941e2a67d59007f800ba3d40e3ebc to your computer and use it in GitHub Desktop.
Save bklaas/c2f941e2a67d59007f800ba3d40e3ebc to your computer and use it in GitHub Desktop.
Scrobble Milestones
import csv
def read_csv_reverse(filepath):
with open(filepath, mode='r') as file:
reader = csv.reader(file)
rows = list(reader)
return reversed(rows)
rows_reversed = read_csv_reverse('bklaas.csv')
for i, row in enumerate(rows_reversed, start=1):
if i % 25000 == 0:
print(' - '.join([str(i), row[0], row[2], row[3]]) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment