import turtle as tl
tl.color('red')
tl.forward(100)
tl.left(90)
tl.forward(100)
tl.left(90)
tl.color('green')
tl.forward(100)
tl.left(90)
tl.forward(100)
![](https://i-blog.csdnimg.cn/blog_migrate/aac040b60c6d872ff5e496c59de9cb85.png)
import turtle as tl
tl.color('red')
tl.forward(100)
tl.left(90)
tl.forward(100)
tl.left(90)
tl.color('green')
tl.forward(100)
tl.left(90)
tl.forward(100)