Data Science, Product Analytics, Simulation, Deep Dives, Programming.
RequestQueue: def __init__(self, queue = None): if queue is None: self.requests = [] else: self.requests = queue def get_requests_in_queue(self): return len(self.requests) def add_request(self, request): self.requests.append(request) def get_next_item(self): if len(self.requests) == 0: return None