Output:

Using list as queue in python
quue is first in first out, deque method is available in python to convert list as queue.
popleft method is used to pop first in element of list. append is used to add element in last.