redlist=[]
defmove():
penup()
if color()[0]=="red":
#coordinates of redlist should be filled here defpaint():
pendown()
if color()[0]=="red":
begin_fill
redlist.append(pos())
解决方案
我不知道你的意思,但坐标我打电话给他们x,并y
redlist=[]
defmove():
penup()
if color()[0]=="red":
x = 1# replace this line
y = 2# replace this line
redlist.append((x, y)) # you can access them by #x, y = redlist[-1]#coordinates of redlist should be filled here defpaint():
pendown()
if color()[0]=="red":
begin_fill
redlist.append(pos())