Let's explore an alternative method using Python. In this example, we utilize list mutation alongside a conditional statement to filter out duplicates while maintaining the original sequence of characters. def remove_duplicates ( input_string ) : output_string = [ ] [ output_string . append ( i ) for i in input_string if not output_string . count ( i ) ] return '' . join ( output_string ) For each character in the input string, we verify whether that character is already in output_string . If it isn't, we add it to the end. Finally, we concatenate the list of characters into a string before returning it. This method also retains the original character order. However, it may be less efficient since the count operation within the list comprehension operates in linear time, resulting in an overall time complexity of O(n^2).