【发布时间】:2019-10-16 11:59:12
【问题描述】:
我正在使用海龟模块,我想获取海龟的位置。我查看了文档,但也许我只是没有看到它。
我想知道两只海龟是否在同一个位置,所以这样的代码:
from turtle import *
turtle1 = Turtle()
turtle2 = Turtle()
pos1 = ... #Should be turtle1 position
pos2 = ... #SHould be turtle2 position
if pos1 == pos2:
#do stuff
【问题讨论】:
标签: python python-3.x turtle-graphics