Skip to content

Instantly share code, notes, and snippets.

@wanderindev
Created June 19, 2022 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wanderindev/bf60f2961ab57eb9538e3a4cea4d21c7 to your computer and use it in GitHub Desktop.
Save wanderindev/bf60f2961ab57eb9538e3a4cea4d21c7 to your computer and use it in GitHub Desktop.
def remove(self, node_data: Any) -> None:
"""Remove the first node whose data is node_data"""
if not self.is_empty():
prev_node = self.get_prev_node(node_data)
prev_node.next_node = prev_node.next_node.next_node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment