check if the length of deque empty python code example Example: python deque empty if d: # not empty else: # empty