Back to task

350 symbols python3
Fri Jan 5 04:43:58 2018 Sait2000
def F(t):
 w,r=S(I());a=len(r);*p,=o=[' ']*a;n=1
 for s in S(I()[6:],", "):
  e,b,*_=map(int,S(s,":")*2);d=b-e;p[~e:a-b]=-~d*'^'or"/%s\\"%("-"*~d);o[~e]=str(n);n+=1;t+=r[~e:a-b]*x
  if~-x:r,t=r[:~e]+t[:1-d]+r[a-b:],t[1-d:]
 return[''.join(q).rstrip()for q in[w,o,p,r]+[t]*x]
I=input
S=str.split
x=1
*h,z=F('')
x=0
print(*h,"","="+z,"",*F(z),sep='\n')


Leave a comment

Parsed as Markdown

Login to leave a comment