Skip to content

Instantly share code, notes, and snippets.

@dvergur
Last active September 12, 2022 01:00
Show Gist options
  • Save dvergur/7981334 to your computer and use it in GitHub Desktop.
Save dvergur/7981334 to your computer and use it in GitHub Desktop.
Simple python lotto number picker
#!/usr/bin/python
import random
from random import choice
for k in range(10):
pick = list(range(1,43))
numbers = []
i=1
for j in range(5):
num = random.choice(pick)
pick.remove(num)
numbers.append(num)
i=i+1
print sorted(numbers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment