class Queue(): def __init__(self): self.__items=[] def is_empty(self): return self.__items==[] def length(self): return len(self.__items) def travel(self): if self.is_empty(): return False for i in self.__items: print(i,end='') print('') def add(self,item): self.__items.append(item) def pop(self): self.__items.pop(0) if __name__ == '__main__': qq=Queue() for i in range(10): qq.add(i) qq.travel() print(qq.length()) qq.add(1) qq.travel() qq.pop() qq.travel()