Stacks and Queues in Python