Skip to content

Instantly share code, notes, and snippets.

@jonasryberg
jonasryberg / hemligtomte.py
Last active December 1, 2018 23:13
Lottar julklappspar från en lista av inmatade namn.
# -*- coding: utf-8 -*-
import random
import sys
xlist = list(sys.argv)
xlist.remove('hemligtomte.py')
tomtarInput = list(xlist)
mottagareInput = list(xlist)
# Takes a textfile and urlifys the lines
import fileinput
import urllib.parse as parse
with fileinput.input() as file:
for line in file:
print(parse.quote(line))