Implementing a Queue using List in Python