Skip to content

Instantly share code, notes, and snippets.

@tommorris
Created February 10, 2009 17:05
Show Gist options
  • Save tommorris/61467 to your computer and use it in GitHub Desktop.
Save tommorris/61467 to your computer and use it in GitHub Desktop.
lottery picker
(1..49).to_a.sort_by{ rand }.slice(0..6).sort
from random import shuffle
lottery_balls = range(1,49)
shuffle(lottery_balls)
lottery_balls[0:6]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment