trimming by recursive (deterministic)

B=list(open('../fd/0'))
while"*"not in B[0]:B=B[1:]
l,r=map(min,zip(*[[b[::d].find("*")%99for d in[1,-1]]for b in B]))
for b in B:print b[l:-r]

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

download

return to the top page