Hi
I am unable to get the following code to work:
def remove_duplicates (strng):
"""
>>> remove_duplicates ('apple')
'aple'
>>> remove_duplicates ('Mississippi')
'Misp'
>>> remove_duplicates ('The quick brown fox jumps over the lazy dog')
'The quick brown fx jmps v t lazy dg'
>>> remove_duplicates ('121 balloons 2 u')
'121 balons 2 u'
"""
I am required to return a string which is the same as the argument except only the first occurrence of each letter is present. Upper and lower case letters are treated as different and only duplicate letters are removed, other characters such as spaces or numbers are not changed.
It has to pass in a doctest.
I cannot get this to work, please can someone help!