Skip to main content
deleted 1 character in body
Source Link
Rod
  • 18.4k
  • 4
  • 31
  • 89

Python 2, 55 54 51 5757 53 bytes

-3 bytes (and a bug fix) thanks to Felipe Nardi Batista

i=0
for c in input():i-=i and c<'<';print'=c<'<'*i;print' '*i+c;i+=c>'<'

Try it online!Try it online!

Python 2, 55 54 51 57 bytes

-3 bytes (and a bug fix) thanks to Felipe Nardi Batista

i=0
for c in input():i-=i and c<'<';print' '*i+c;i+=c>'<'

Try it online!

Python 2, 55 54 51 57 53 bytes

-3 bytes (and a bug fix) thanks to Felipe Nardi Batista

i=0
for c in input():i-=c<'<'*i;print' '*i+c;i+=c>'<'

Try it online!

deleted 164 characters in body
Source Link
Rod
  • 18.4k
  • 4
  • 31
  • 89

Python 2, 55 54 5151 57 bytes

-3 bytes (and a bug fix) thanks to Felipe Nardi Batista

i=1i=0
for c in input():i-=c<'<';print'=i and c<'<';print' '*i+c;i+=c>'<'

Try it online!

The extra space is allowed in the rulesTry it online!

Each line may have extra trailing whitespace as long as this doesn't change the visual appearance of the output.

Python 2, 55 54 51 bytes

-3 bytes thanks to Felipe Nardi Batista

i=1
for c in input():i-=c<'<';print' '*i+c;i+=c>'<'

Try it online!

The extra space is allowed in the rules

Each line may have extra trailing whitespace as long as this doesn't change the visual appearance of the output.

Python 2, 55 54 51 57 bytes

-3 bytes (and a bug fix) thanks to Felipe Nardi Batista

i=0
for c in input():i-=i and c<'<';print' '*i+c;i+=c>'<'

Try it online!

added 164 characters in body
Source Link
Rod
  • 18.4k
  • 4
  • 31
  • 89

Python 2, 55 54 51 bytes

-3 bytes thanks to Felipe Nardi Batista

i=1
for c in input():i-=c<'<';print' '*i+c;i+=c>'<'

Try it online!

The extra space is allowed in the rules

Each line may have extra trailing whitespace as long as this doesn't change the visual appearance of the output.

Python 2, 55 54 51 bytes

-3 bytes thanks to Felipe Nardi Batista

i=1
for c in input():i-=c<'<';print' '*i+c;i+=c>'<'

Try it online!

Python 2, 55 54 51 bytes

-3 bytes thanks to Felipe Nardi Batista

i=1
for c in input():i-=c<'<';print' '*i+c;i+=c>'<'

Try it online!

The extra space is allowed in the rules

Each line may have extra trailing whitespace as long as this doesn't change the visual appearance of the output.

added 45 characters in body
Source Link
Rod
  • 18.4k
  • 4
  • 31
  • 89
Loading
added 7 characters in body
Source Link
Rod
  • 18.4k
  • 4
  • 31
  • 89
Loading
Source Link
Rod
  • 18.4k
  • 4
  • 31
  • 89
Loading