Skip to main content

Deque.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 Dequeq = Deque()q.enqueue(20)q.enqueue(389)q.enqueue(876)print(q.peek()) # 20