I read of a job interview question to write some code for the following:
Write an efficient function to find the first nonrepeated character in a st
str = "aabcbdefgh" lst = list(str) for i in [(item, lst.count(item)) for item in set(lst)]: if i[1] == 1: print i[0],