blob: 9c9d362f3945254911ab91c28efe350cb13b8568 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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()
|