Python 2.2 (#1, May 14 2002, 18:23:13) 
[GCC 2.95.3 20010315 (SuSE)]
PyShell 1.1 

[In 1]:
import turtle as t
[Out 1]:
[In 2]:
t.create_pen(doc)
doc.SelectNone()
[Out 2]:
[In 36]:
def sierpinski(l, iter):
    if iter <=0:
        t.forward(l)
        t.right(120)
    else:
        for i in range(3):
            sierpinski(l/2., iter-1)

        t.up()
        t.forward(l)
        t.right(120)
        t.down()
[Out 36]:
[In 37]:
doc.SelectNone()
sierpinski(100,4)
[Out 37]:
[In 31]:

[Out 31]:
>



1