摘要: import queue q=queue.Queue(maxsize=4) #创建队列 #往队列里面添加元素 q.put(666) q.put(376) q.put(34) #取出第一个添加到队列中的元素 result=q.get() print(result) 阅读全文
posted @ 2020-07-22 13:54 马蹄哒哒 阅读(146) 评论(0) 推荐(0)
摘要: import threading import time class MyThread(threading.Thread): def __init__(self): super(MyThread,self).__init__() #继承父类的初始化方法 def run(self): print("线 阅读全文
posted @ 2020-07-22 13:43 马蹄哒哒 阅读(224) 评论(0) 推荐(0)