Trying to put the 4 queue.enqueue into a while loop.
Any suggestions? Files are attached.
from string13 import *
from queue import *
stack1 = Stack()
queue = Queue()
pallist =[]
pallist2 =[]
def main():
stack1.push(4)
stack1.push('2')
stack1.push(1)
stack1.push(5)
while not stack1.isEmpty():
pallist.append(stack1.pop())
print pallist
"""while queue.size < len(pallist):"""
queue.enqueue(pallist[3])
queue.enqueue(pallist[2])
queue.enqueue(pallist[1])
queue.enqueue(pallist[0])
while not queue.isEmpty():
pallist2.append(queue.dequeue())
stack1.push(pallist2)
print stack1.pop()
main()