Back to task

403 symbols python3
Wed Jan 3 16:15:12 2018 Sait2000
def F(r,y,x=1):
 *t,=y;*p,=o=[' ']*max(len(t),len(r));n=1
 for s in I().split(": ",1)[1].split(", "):
  e,b,*_=map(int,s.split(":")*2);s=slice(~e,-b or 99);d=e-b+1;p[s]=e>b and"/%s\\"%("-"*(d-2))or"^";o[~e]=str(n);n+=1
  if x:t+=r[s]
  else:t[s],r=r[:d],r[d:]
 return[''.join(x).rstrip()for x in(o,p,t)]
I=input
f,g=I().split()
*o,r=F(g,"")
t,u=I().split()
print(f,*o,g,"","="+r,"",t,*F(r,u,0),sep='\n')


Leave a comment

Parsed as Markdown

Login to leave a comment