From 041da89caba0e62e0cba865334d49a9f787c55e6 Mon Sep 17 00:00:00 2001 From: mjk22071998 Date: Wed, 2 Oct 2024 06:43:03 +0500 Subject: [PATCH] "Rename variable 'nodeData' to 'node_data' in main function" --- data_structures/linked_list/sorted_linked_list.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data_structures/linked_list/sorted_linked_list.py b/data_structures/linked_list/sorted_linked_list.py index 0fe774ceb..f9c3c77db 100644 --- a/data_structures/linked_list/sorted_linked_list.py +++ b/data_structures/linked_list/sorted_linked_list.py @@ -354,16 +354,16 @@ if __name__ == "__main__": choice = input("Enter your choice: ") if choice == "1": - nodeData = int(input("Enter a number: ")) - linked_list.insert(nodeData) + node_data = int(input("Enter a number: ")) + linked_list.insert(node_data) elif choice == "2": linked_list.display() elif choice == "3": - nodeData = int(input("Enter the data to delete: ")) - if linked_list.delete(nodeData): - print(f"Node with data {nodeData} deleted successfully") + node_data = int(input("Enter the data to delete: ")) + if linked_list.delete(node_data): + print(f"Node with data {node_data} deleted successfully") else: - print(f"Node with data {nodeData} not found in the list") + print(f"Node with data {node_data} not found in the list") elif choice == "4": break else: