import turtle
是导入turtle包,不能使用未声明的变量。因此,要对每项加上包的前缀。比如: turtle.Pen,turtle.Turtle
from turtle import *
未导入turtle包,但实际上从这个命名空间导入了所有的成员,所有直接使用命名空间内已经定义好的项目名称即可。比如直接使用 Pen,Turtle
参见 Stack Overflow https://stackoverflow.com/questions/30743500/what-is-the-difference-between-import-turtle-and-from-turtle-import