06 2020 档案
摘要:1 import collections 2 from random import choice, shuffle 3 4 # 构建了一个简单的 Card 类来表示一张纸牌,rank牌值,suit花色 5 Card = collections.namedtuple('Card', ['rank',
阅读全文
摘要:""" Queue 实现了多生产者、多消费者队列 """ from multiprocessing import Process, Queue import os, time, random from threading import Thread q = Queue(30) # 写数据进程执行的代
阅读全文