Sierpinski Fractal by

def f(i):
    if i<2:return [" /\\ ","/__\\"]
    else:i-=1;j=2**i;return [' '*j+k+' '*j for k in f(i)]+[a+b for a,b in zip(f(i),f(i))]
print'\n'.join([i.rstrip() for i in f(input())])

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

download

return to the top page