text: Driver code
code: if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT head = Node ( ' a ' ) NEW_LINE head . next = Node ( ' b ' ) NEW_LINE head . next . next = Node ( ' c ' ) NEW_LINE head . next . next . next = Node ( ' e ' ) NEW_LINE head . next . next . next . next = Node ( ' d ' ) NEW_LINE head . next . next . next . next . next = Node ( ' o ' ) NEW_LINE head . next . next . next . next . next . next = Node ( ' x ' ) NEW_LINE head . next . next . next . next . next . next . next = Node ( ' i ' ) NEW_LINE print ( " Linked ▁ list ▁ before ▁ : " ) NEW_LINE printlist ( head ) NEW_LINE head = arrange ( head ) NEW_LINE print ( " Linked ▁ list ▁ after ▁ : " ) NEW_LINE printlist ( head ) NEW_LINE DEDENT