Skip to content

Instantly share code, notes, and snippets.

@IanMulvany
Created April 15, 2016 14:29
Show Gist options
  • Save IanMulvany/5ec82999fb045e0dfdb8596b072db9e2 to your computer and use it in GitHub Desktop.
Save IanMulvany/5ec82999fb045e0dfdb8596b072db9e2 to your computer and use it in GitHub Desktop.
import random
from collections import defaultdict
attendees = ["nathan", "chris"]
run_number = 1000
attendees_result = defaultdict(int)
for i in range(run_number):
attendees_result[random.choice(attendees)] +=1
print attendees_result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment