Skip to content

Instantly share code, notes, and snippets.

@newsch
Created September 19, 2018 02:52
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 newsch/cb34a01e1331bce85ab56ca41489a0b0 to your computer and use it in GitHub Desktop.
Save newsch/cb34a01e1331bce85ab56ca41489a0b0 to your computer and use it in GitHub Desktop.
Parse a csv of Olin student groups and output formatted text.
#!/usr/bin/env python3
import csv
with open('groups.csv', 'r') as csvfile:
reader = csv.DictReader(csvfile, ['full','acrnm','leader'])
names = [club['acrnm'] if club['acrnm'] != '' else club['full'] for club in reader]
[print(name) for name in names]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment