Skip to content

Conversation

likileads
Copy link

@likileads likileads commented May 6, 2021

def remove_by_value(self, data):
if self.head.data == data:
self.head = self.head.next
return

	itr = self.head
	itr2 = None
	while itr:
		if not itr.data == data:
			itr2 = itr
			itr = itr.next

		else:
			itr2.next = itr.next
			break

@likileads likileads closed this May 6, 2021
@likileads likileads deleted the patch-1 branch May 6, 2021 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant