Back to task

390 symbols python3
Wed Jan 3 16:23:25 2018 Sait2000
def F(r,t,x):
 *p,=o=[' ']*max(len(t),len(r));n=1
 for s in S(S(I(),": ",1)[1],", "):
  e,b,*_=map(int,S(s,":")*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
S=str.split
f,g=S(I())
*o,r=F(g,[],1)
t,u=S(I())
print(f,*o,g,"","="+r,"",t,*F(r,[*u],0),sep='\n')


Leave a comment

Parsed as Markdown

Login to leave a comment