Skip to content

Instantly share code, notes, and snippets.

@bazbt3
Last active November 29, 2017 19:03
Show Gist options
  • Save bazbt3/abf7616024e35383f8e003531f33efd6 to your computer and use it in GitHub Desktop.
Save bazbt3/abf7616024e35383f8e003531f33efd6 to your computer and use it in GitHub Desktop.
Secret Santa gift chooser
# Secret Santa gift chooser
# @bazbt3
import random
items = ["suits", "flange", "nipple", "socket", "lubricant", "gusset", "spigot", "Cairo!"]
print("initial list\n", items)
i = 0
for item in items:
i += 1
while i != 0:
j = i
while j != 0:
random.shuffle(items)
print("shuffled list\n", items)
n = random.randrange(i)
if i > 1:
print("Remove", items[n], "from list.")
elif i == 1:
print("Only", items[n], "remains. Get it!!!")
del items[(n)]
j -= 1
i -= 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment