8000 Merge pull request #4 from ifbizo/master · sadid07/practice-python@593b735 · GitHub
[go: up one dir, main page]

Skip to content

Commit 593b735

Browse files
authored
Merge pull request jwasham#4 from ifbizo/master
Delete all instances of value
2 parents 7f8c1ef + 73b91f7 commit 593b735

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

linked_lists/linked_list.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ def delete(self, value):
5252
prev.set_next(current.get_next())
5353
else:
5454
self.head_ = current.get_next()
55-
break
56-
else:
57-
prev = current
58-
current = current.get_next()
55+
prev = current
56+
current = current.get_next()
5957

6058
# Pushes an item on the front of the list.
6159
def push(self, value):

0 commit comments

Comments
 (0)
0