News for hackers. Stuff that matters.
Re:To apply, solve the following... are you kidding? by achompas on Friday September 30, 2011 @11:55AM (#3057441)
My first pass (assumes input file is an arg):

    import sys

    def first_unique(word):
        if len(word) == 0:
            return "EOF"
        for i in range(0, len(word)-1):
            return word[i] if word[i] != word[i+1]
        return "NA"

    def main():
        with open(sys.argv[1],'r') as f:
            print first_unique(f.readline())

There are no comments on this comment yet.