From d09a805804641aabce64cf0fe97a5edc623b3380 Mon Sep 17 00:00:00 2001 From: Logan Lieou Date: Tue, 14 Jan 2020 03:21:02 -0600 Subject: [PATCH] Typo? (#1653) * Typo? newNod -> newNode * newNode -> new_node Co-authored-by: Christian Clauss --- data_structures/linked_list/singly_linked_list.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data_structures/linked_list/singly_linked_list.py b/data_structures/linked_list/singly_linked_list.py index 8730a6d2a..fb04ce103 100644 --- a/data_structures/linked_list/singly_linked_list.py +++ b/data_structures/linked_list/singly_linked_list.py @@ -21,10 +21,10 @@ class LinkedList: temp.next = Node(data) # create node & link to tail def insert_head(self, data) -> None: - newNod = Node(data) # create a new node + new_node = Node(data) # create a new node if self.head: - newNod.next = self.head # link newNode to head - self.head = newNod # make NewNode as head + new_node.next = self.head # link new_node to head + self.head = new_node # make NewNode as head def print_list(self) -> None: # print every node data temp = self.head