Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

queue peek python

## A peek function in the python queue is used to print the first element of the queue. 
## It returns the item which is present at the front index of the queue.
## It will not remove the first element but print it.

def peek(self):
  print(self.queue[self.front])
queue1.peek()
 
PREVIOUS NEXT
Tagged: #queue #peek #python
ADD COMMENT
Topic
Name
4+4 =