Skip to main content

DoublyLinkedList.remove_front

Remove the item at the front of the linked list

Usage

remove_front()

Returns:
      DoublyLinkedList
            Returns the same Linked List without the deleted item.

Example

from jellybeans.structures import DoublyLinkedListLL1 = DoublyLinkedList([10, 3, 7, 29])LL1.remove_front().remove_front()print(LL1) # 7 => 29LL2 = DoublyLinkedList([5, 6, 7])LL2.remove_front()print(LL2) # 6 => 7