Skip to main content

Queue.peek

Take a look at the element at the front of the queue

Usage

peek()

Returns:
      element
            Returns the element at the front of the queue

Example

from jellybeans.structures import Queueq = Queue()q.enqueue(20)q.enqueue(389)q.enqueue(876)print(q.peek()) # 20