Python-线程-循环顺序打印abc
import threadingdef showa(): while True: lockc.acquire() # 获取对方的锁,释放自己的锁 print('a', end='') locka.release()def showb(): while True: locka.acquire() print('b', end='') lockb.release() #.





