Can someone help me with my queue? I think the stack works fine.
I just need the indexing of the queue or do I need to index the queue?
from string12 import *
from queue import *
def main():
stack1 = Stack()
queue = Queue()
word = raw_input("Enter a word or number sequence to check for palidrom: ")
l_case = word.lower()
s_case = word.lower()
pallist1 = []
pallist2 = []
print l_case
print s_case
index = 0
while index < len(l_case):
letter = l_case [index]
stack1.push(letter)
index +=1
while not stack1.isEmpty():
pallist1.append(stack1.pop())
print pallist1
indexs = 0
while indexs > len(s_case):
butter = s_case [index]
queue.enqueue(butter)
indexs +=1
while not queue.isEmpty():
pallist2.append(queue.dequeue())
print pallist2
string1 = "".join(pallist1)
string2 = "".join(pallist2)
print string1
print string2
if string1 == string2:
print "Palindrome"
else:
print "No Palindrome"
main()