Queue in Python

Queues are fundamental data structures that follows the First In, First Out (FIFO) principle, meaning the first element added to the queue…