From af13ce6289f61f54940acddf28eef14c310fbac3 Mon Sep 17 00:00:00 2001 From: michivonah Date: Tue, 2 Dec 2025 22:02:02 +0100 Subject: [PATCH] create wichtel tool --- christmas/wichteln.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 christmas/wichteln.py diff --git a/christmas/wichteln.py b/christmas/wichteln.py new file mode 100644 index 0000000..345b7ed --- /dev/null +++ b/christmas/wichteln.py @@ -0,0 +1,24 @@ +# Christmas "wichteln" random people picker +# Michi von Ah + +import random + +names = ["sepp", "max", "hans", "maria"] +avail = names.copy() +picked = [] + + +for person in names: + selection = random.choice(avail) + + while selection == person: + selection = random.choice(avail) + avail.remove(selection) + print(f'{person} wichtelt {selection}') + + +# Example output: +# sepp wichtelt an hans +# max wichtelt an maria +# hans wichtelt an max +# maria wichtelt an sepp \ No newline at end of file