Question: I am relatively new to python and am wondering how one would approach reversing a queue. Now if I understand correctly, a queue is simply a data structure that can be implemented in any language, using a list in python for example. 

So basically if a question asks to reverse a stack or a queue, but since both can be represented using a list, isn't it the same as saying to reverse the contents of the list? I did some research on this topic and found that through using a class and methods, you can implement enqueue, dequeue and isEmpty operations. 

```
class Queue:

    def __init__(self):
        self.items = []

    def isEmpty(self):
        return self.items == []

    def enqueue(self, item):
        self.items.insert(0,item)

    def dequeue(self):
        return self.items.pop()

```

So if I were asked to reverse the contents of a queue stack for example, does that mean I have to reverse the contents of the list by using only the above methods? (by only removing items at the front of the list, and adding items at the back of list)

Answer: 
You can use an auxiliar stack to reverse the elements of your Queue.

Basically, you will stack every element of your Queue until it becomes empty. Then you pop each element of your stack and enqueue it until your stack is empty.

```
# suppose your have a Queue my_queue
aux_stack = Stack()
while not my_queue.isEmpty():
    aux_stack.push(my_queue.dequeue())

while not aux_stack.isEmpty():
    my_queue.enqueue(aux_stack.pop())

```
**A Simple way using another queue**

```
queue = [] # queue
queue.append(1) # adding items
queue.append(2)
queue.append(3)
print(queue)   #original queue

queue_2 = []
for i in range(0,len(queue)):
    queue_2.append(queue.pop())
print(queue_2) # reversed queue

```

1. create an empty queue using a python list
2. append items to list
3. create another empty queue.

4.Using a for loop pop the values from 1st queue to the second one.

5.Done!!!