Set two pointers , first to the beginning of DLL and second to the end of DLL .
first = head NEW_LINE second = head NEW_LINE while ( second . next != None ) : NEW_LINE INDENT second = second . next NEW_LINE DEDENT