view bin/rainwords @ 3485:f8d58f5d46e5

<Taneb> learn Go is a programming language invented by Google, a game invented in East Asia, and a common verb in the English language, invented by Germanic tribes. Taneb invented all three.
author HackBot
date Tue, 27 Aug 2013 20:48:44 +0000
parents f2f65a1fa363
children ad9096aff22a
line wrap: on
line source

#!/usr/bin/python
import random; w=[l.split() for l in open("/dev/stdin").read().split("\n")]; r=[4,7,8,9,2,13,6]; print "\n".join((lambda s: " ".join(chr(3) + str(r[(i+s)%len(r)]) + l[i] for i in range(len(l))))(random.randrange(0, len(r))) for l in w)