Skip to main content
4 of 4
Forgot to change the byte count in the header
squareroot12621
  • 1.2k
  • 1
  • 3
  • 18

Python 3.8 (pre-release),  263   243   229   226   225   187   168   151  150 bytes

-20 bytes by applying some small modifications.
-14 bytes by emanresu A.
-3 bytes by noodle person.
-75 bytes by ASCII-only.
-1 byte by noodle person.

…Okay, what—

def f(b,c=[]): for i in b:c+=[0,1,2][i::2] for i in range(l:=len(c),-1,-1):print(" "*i+" /"[[0,*c][i]]+" \\"[i>0]+" \\"*(i<l)+" /"[[*c,0,0][i+1]]) 

Try it online!

squareroot12621
  • 1.2k
  • 1
  • 3
  • 18