Created
April 12, 2017 11:31
-
-
Save funkyHat/f1801e9190b2855b568cef4c7aeb7d82 to your computer and use it in GitHub Desktop.
Eventbrite attendees list raffle
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
import random | |
import sys | |
from openpyxl import load_workbook | |
if __name__ == "__main__": | |
wb = load_workbook(sys.argv[1]) | |
sheet = wb['Attendees'] | |
winner = random.choice(list(sheet)) | |
print("{} is the winner!".format(' '.join(x.value for x in winner[2:4]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment