【发布时间】:2017-05-01 18:47:21
【问题描述】:
我想知道在 python 中同时执行两个或多个命令的最简单方法是什么。例如:
from turtle import *
turtle_one=Turtle()
turtle_two=Turtle()
turtle_two.left(180)
#The lines to be executed at the same time are below.
turtle_one.forward(100)
turtle_two.forward(100)
【问题讨论】:
-
我写这篇评论只是为了注意这与在 Python 中并行执行的事情无关(有几种解决方案),而更多地与使用 Python 的 Turtle 模块并行执行动画有关- 这既会限制一个人的选择,也可能会在单独的软件层中强制使用特定的解决方案。
标签: python python-3.x turtle-graphics