fish simulation by rolf

def r(m):g=m.groups();return g[1]+d*len(g[2])+"[%d]B@"%(int(g[0])+int(g[3])) 
import re;w=raw_input();b="\[(\d+)\]B@([.,~]+)";d=".";exec'w=re.sub(b+"((\d+):.)",r,w);'*9;d=",";exec'w=re.sub(b+"(\[(\d+)\]B@)",r,w);'*9;print w 

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page