Skip to main content
added 30 characters in body
Source Link
Jonathan Allan
  • 110.1k
  • 7
  • 65
  • 282

Python 2, 131 131  130 bytes

x=input()
n=len(x)
s=" "
for v in[" "*2*n+"_"*in[s*2*n+"_"*(2+len(x[0]))]+[" "*i+"\\"+"  "*]+[s*i+"\\"+s*2*(n+~i)+"/"+" "*"+s*-~i+r for i,r in enumerate(x)]:print v[n/2:]

A full program taking a list of lines as input with the rectangular-only allowance (actually that the first line is one of the longest).

Try it online!Try it online!

Python 2, 131 bytes

x=input()
n=len(x)
for v in[" "*2*n+"_"*(2+len(x[0]))]+[" "*i+"\\"+"  "*(n+~i)+"/"+" "*-~i+r for i,r in enumerate(x)]:print v[n/2:]

A full program taking a list of lines as input with the rectangular-only allowance (actually that the first line is one of the longest).

Try it online!

Python 2,  131  130 bytes

x=input()
n=len(x)
s=" "
for v in[s*2*n+"_"*(2+len(x[0]))]+[s*i+"\\"+s*2*(n+~i)+"/"+s*-~i+r for i,r in enumerate(x)]:print v[n/2:]

A full program taking a list of lines as input with the rectangular-only allowance (actually that the first line is one of the longest).

Try it online!

Source Link
Jonathan Allan
  • 110.1k
  • 7
  • 65
  • 282

Python 2, 131 bytes

x=input()
n=len(x)
for v in[" "*2*n+"_"*(2+len(x[0]))]+[" "*i+"\\"+"  "*(n+~i)+"/"+" "*-~i+r for i,r in enumerate(x)]:print v[n/2:]

A full program taking a list of lines as input with the rectangular-only allowance (actually that the first line is one of the longest).

Try it online!