Skip to content

Commit ddafbbc

Browse files
committed
Clean the script from redundant checks.
1 parent 8bdd2a2 commit ddafbbc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎Sprint-2/implement_linked_list/linked_list.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def remove(self, node_handle: Optional[Node]) -> None:
5353
self.head = None
5454

5555
else:
56-
if node_handle.previous and node_handle.next:
56+
assert node_handle.previous is not None
57+
assert node_handle.next is not None
5758
node_handle.previous.next = node_handle.next
5859
node_handle.next.previous = node_handle.previous
5960

0 commit comments

Comments
 (0)