Created
September 19, 2018 02:52
-
-
Save newsch/cb34a01e1331bce85ab56ca41489a0b0 to your computer and use it in GitHub Desktop.
Parse a csv of Olin student groups and output formatted text.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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