摘要: 队列: 先进先出 后进先出 VIP(优先级) import queue # q = queue.LifoQueue()#后进先出 # # q.put(1) # q.put(2) # q.put(3) # print(q.get()) # print(q.get()) # print(q.get()) 阅读全文
posted @ 2018-04-08 16:29 Py小白 阅读(248) 评论(0) 推荐(0) 编辑
摘要: import time,threading event = threading.Event() def lighter(): count = 0 event.set() while True: if count > 5 and count < 10:#改成红灯 event.clear()#把标志位清 阅读全文
posted @ 2018-04-08 16:27 Py小白 阅读(1441) 评论(0) 推荐(0) 编辑