diff options
-rwxr-xr-x | papanoel.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/papanoel.py b/papanoel.py new file mode 100755 index 0000000..9c9d362 --- /dev/null +++ b/papanoel.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 +# Poor's man Secret Santa + +import random +import sys + +def main(): + people = [] + + for person in sys.stdin: + people += [person.rstrip()] + + random.shuffle(people) + amount = len(people) + for i in range(amount): + print("{} -> {}".format(people[i], people[(i + 1) % amount])) + +if __name__ == "__main__": + main() |