The script draws Peano’s curve using turtle graphics.
from turtle import * def a(i): if i>0: left(90) b(i-1) forward(3) right(90) a(i-1) forward(3) a(i-1) right(90) forward(3) b(i-1) left(90) def b(i): if i>0: right(90) a(i-1) forward(3) left(90) b(i-1) forward(3) b(i-1) left(90) forward(3) a(i-1) right(90) penup() goto(-96,-96) pendown() hideturtle() a(6)