From f608de3e1f29e492acea7aaff20262ea9da78a38 Mon Sep 17 00:00:00 2001 From: NIKITA PANDEY <113332472+nikitapandeyy@users.noreply.github.com> Date: Fri, 17 Mar 2023 15:04:50 +0530 Subject: [PATCH] Update Program to reverse Linked List( Recursive solution).py ogical issue in the printLinkedList function. When the function prints the data of each node in the linked list, it does not print a newline character after each node, so the output appears as a single line instead of multiple lines. --- Program to reverse Linked List( Recursive solution).py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Program to reverse Linked List( Recursive solution).py b/Program to reverse Linked List( Recursive solution).py index 61a6165bab2..96263c6a276 100644 --- a/Program to reverse Linked List( Recursive solution).py +++ b/Program to reverse Linked List( Recursive solution).py @@ -46,12 +46,10 @@ def takeInput(): def printLinkedList(head): - while head is not None: print(head.data, end=" ") head = head.next - - print() + print() # main