Skip to content

Instantly share code, notes, and snippets.

@dobrokot
Created June 24, 2015 16:12
Show Gist options
  • Save dobrokot/8889a79885833ff8fa7b to your computer and use it in GitHub Desktop.
Save dobrokot/8889a79885833ff8fa7b to your computer and use it in GitHub Desktop.
random basket number of elements variance
import random
def main():
basket = [0]*5
rand = random.randrange
for i in xrange(27777777):
basket[rand(0, 5)%5] += 1
for v in basket:
print v
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment