import turtle def drawTriangle(): for i in range(3): turtle.fd(60) turtle.left(120) for i in range(6): drawTriangle() turtle.penup() turtle.fd(60) turtle.pendown() turtle.right(60)
如图: