Skip to content

Instantly share code, notes, and snippets.

@funkyHat
Created April 12, 2017 11:31
Show Gist options
  • Save funkyHat/f1801e9190b2855b568cef4c7aeb7d82 to your computer and use it in GitHub Desktop.
Save funkyHat/f1801e9190b2855b568cef4c7aeb7d82 to your computer and use it in GitHub Desktop.
Eventbrite attendees list raffle
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