Python time.sleep

Hey everyone!
I had a Python programming lesson for today in which I was challenged to create a Queue in the following format..

Program a Queue so that:
-When you type in a name, it gets added to the end of the queue and the queue is displayed
-Every 10 seconds, the first name is removed from the queue and the updated queue is displayed
-If the name is that of an administrator, then their name goes to the front of the queue

I managed to do everything but the 10 second part. I initially tried something but it just delayed everything by 10 seconds when it got to it. Anyone got any idea on how to do this?

You are viewing a single comment. View All

You should probably put the delay at the end of the loop