view bin/rainwords @ 3331:d648a4814871

<monotone> (echo \'#!/usr/bin/tail -1\'; echo \'meow meow meow meow\') > bin/cats && chmod +x bin/cats
author HackBot
date Wed, 31 Jul 2013 00:52:12 +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)