What is the quickest way to find the first character which only appears once in a string?
Here is another fun way to do it. Counter requires Python2.7 or Python3.1
>>> from collections import Counter
>>> def first_non_repeated_character(s):
... return min((k for k,v in Counter(s).items() if v<2), key=s.index)
...
>>> first_non_repeated_character("aaabbbcffffd")
'c'
>>> first_non_repeated_character("aaaebbbcffffd")
'e'