Function to print the linked link
def printList ( head ) : NEW_LINE INDENT while ( head ) : NEW_LINE INDENT print ( head . data , end = ' - > ' ) NEW_LINE head = head . next NEW_LINE DEDENT print ( ' NULL ' ) NEW_LINE DEDENT