Oct-12-2020, 05:35 PM
Create the size() function. This function should take a queue and return the number of elements it currently contains.
1.Define a function called size()
2.It should take one argument: queue
3.Return len of the queue - which is the argument for this function
1.Define a function called size()
2.It should take one argument: queue
3.Return len of the queue - which is the argument for this function
Quote:def size(self):
return len(self.queue)