Skip to main content

Queue.is_empty

Checks if there are elements in the queue

Usage

is_empty()

Returns:
      Boolean
            Returns True if there are 0 elements in the queue

Example

from jellybeans.structures import Queueq = Queue()q.enqueue(20)q.dequeue()print(q.is_empty()) # True