python data structures we are familiar with queue in our day to day life as we wait for service the queue data structure also means the samewhere the data elements are arranged in queue the uniqueness of queue lies in the way items are added and removed the items are allowed at on endbut removed from the other end soit is first-in-first out method queue can be implemented using python listwhere we can use the insert(and pop(methods to add and remove elements there is no insertion as data elements are always added at the end of the queue adding elements in the below examplewe create queue classwhere we implement the first-in-first-out method we use the in-built insert method for adding data elements class queuedef __init__(self)self queue list(def addtoq(self,dataval)insert method to add element if dataval not in self queueself queue insert( ,datavalreturn true return false def size(self)return len(self queuethequeue queue(thequeue addtoq("mon"thequeue addtoq("tue"thequeue addtoq("wed"print(thequeue size()when the above code is executedit produces the following result