title: Python - return combination of 2 queues
body: <pre><code>class Queue:
  def __init__(self):
      self.items = []
  
  def isEmpty(self):
      return self.items == []
  
  def enqueue(self, item):
      self.items.append(item)
  
  def dequeue(self):
      if self.items == []:
          raise IndexError('The queue is empty.')
      return self.items.pop()
  
  def size(self):
      return len(self.items)
  
  def __str__(self):
      return "Queue: " + (str(self.items))
  
  def enqueue_list(self, list):
      for i in list:
          self.items.append(i)
      return self.items
  
  def splice(self, second_queue):
      for i in second_queue:
          self.items.enqueue(i)
      return self.items
  </code></pre>
  
  <p>Hi there,</p>
  
  <p>What I am trying to do is at the bottom in the splice method. I want to iterate through a second queue and add it to the end of the original one. I can't find out how I can iterate through a queue without causing an error however. Should I change second_queue into a list somehow first?</p>
  
  <pre><code>Original exception was:
  Traceback (most recent call last):
  File "prog.python3", line 74, in &lt;module&gt;
  my_queue.splice(another_queue)
  File "prog.python3", line 28, in splice
  for i in second_queue:
  TypeError: 'Queue' object is not iterable
  </code></pre>