|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
怎么让一个县城重复多次使用(而且不结束前一个县城)
最初想法:- import threading
- import time
- def a():
- print('ni')
- time.sleep(2)
- b = threading.Thread(target=a)
- while True:
- b.start()
复制代码
报错Traceback (most recent call last):
File "g:/Programming/Python/和小甲鱼学的Python/003/dd.py", line 9, in <module>
b.start()
File "C:\Users\Mike\AppData\Local\Programs\Python\Python37\lib\threading.py", line 848, in start
raise RuntimeError("threads can only be started once")
RuntimeError: threads can only be started once
有大佬可以改一下吗
效果是让a print的越来越快 |
|