removing element in the below examplewe create queue classwhere we insert the data and then remove the data using the in-built pop method 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 pop method to remove element def removefromq(self)if len(self queue)> return self queue pop(return ("no elements in queue!"thequeue queue(thequeue addtoq("mon"thequeue addtoq("tue"thequeue addtoq("wed"print(thequeue removefromq()print(thequeue removefromq()when the above code is executedit produces the following resultmon tue