python - 如何获得 turtle 的位置?

标签 python turtle-graphics python-turtle

如何在 python 中找到 turtle 的坐标?

例如,如果 turtle 位于 (200, 300),我将如何检索该位置?

最佳答案

如 Python 文档所示,turtle.pos()返回 turtle 的当前位置作为 (x,y) 的二维向量。

关于python - 如何获得 turtle 的位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45097834/

相关文章:

turtle-graphics - 如何让两只或更多 turtle 同时执行一项任务?

python - Python Turtle 中的淡入淡出文本

python - 为什么 str.lstrip 会去掉一个额外的字符?

python - 如何在 Python 3 中使用 Turtle 绘制圆

python - turtle 和倾斜物体

python - 有没有办法镜像Python函数?

python - urllib、urllib2、urllib3 和 requests 模块有什么区别?

Python 英特尔 MKL fatal error : Cannot load mkl_intel_thread. dll

python - 从字典列表中删除重复项会引发异常吗?

python - 我在 python 2.7 中用循环搞乱 turtle 导入, turtle 不会移动