看到几个这样的q,没有什么帮助): 有没有一种方法来运行一个循环来检查一个数字是否超过100,如果是,做一些事情? 例如:我可以在另一个循环的背景中运行循环吗? Python
while x == 1: #DoStuff
,并具有这样的:无需等待在他们输入的用户在后台同时运行?
if moneyLoop > 100:
nCoins = nCoins + 1?
看到几个这样的q,没有什么帮助): 有没有一种方法来运行一个循环来检查一个数字是否超过100,如果是,做一些事情? 例如:我可以在另一个循环的背景中运行循环吗? Python
while x == 1: #DoStuff
,并具有这样的:无需等待在他们输入的用户在后台同时运行?
if moneyLoop > 100:
nCoins = nCoins + 1?
是:
http://docs.python.org/2/library/threading.html#thread-objects
http://www.tutorialspoint.com/python/python_multithreading.htm
很难详细地告诉你需要什么你的代码中给出的片段做,但这个应该指向你在正确的方向。