DoublyLinkedList.remove_at_index
Remove an item from a specified index
Usage
remove_at_index(index:int)
Parameters:
index : int
The index of the item to be removed.
Returns:
DoublyLinkedList
Returns the same Linked List without the deleted item.
Example
from jellybeans.structures import DoublyLinkedListLL1 = DoublyLinkedList([10, 3, 7, 29])LL1.remove_at_index(1).remove_at_index(2)print(LL1) # 10 => 7LL2 = DoublyLinkedList([5, 6, 7])LL2.remove_at_index(1)print(LL2) # 5 => 7