Do While Java Queue Operations In Python Code For Snake