Zigzag by croyal

s=raw_input().split()
d=int(s[0])
t=s[1]
for i in range(d):
 e=' '*i+t
 r=' '*i+t+' '*((2*(d-1-i))-1)+t*(not i==d-1)+' '*i
 o=r
 for j in range(d-2):
  o+=r[1:]
 print o+e[1:]

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page