import sys


def lowest_unique(int_list):
    numbers = {}
    for index, number in enumerate(int_list):
        group = numbers.setdefault(int(number), [])
        group.append(index)
    for number in sorted(numbers.keys()):
        retval = numbers[number]
        if len(retval) == 1:
            return retval[0] + 1
    return 0


if __name__ == '__main__':
    inputfile = sys.argv[1]
    with open(inputfile, 'r') as f:
        for line in f:
            line_list = line.rstrip().split()
            if line_list:
                print str(lowest_unique(line_list))

import sys


def lowest_unique(int_list):
    numbers = {}
    for index in range(len(int_list)):
        group = numbers.setdefault(int(int_list[index]), [])
        group.append(index)
    for number in numbers:
        retval = numbers[number]
        if len(retval) == 1:
            return retval[0] + 1
    return 0


if __name__ == '__main__':
    inputfile = sys.argv[1]
    with open(inputfile, 'r') as f:
        for line in f:
            line_list = line.rstrip().split()
            if line_list:
                print str(lowest_unique(line_list))

--- 
+++ 
@@ -3,10 +3,10 @@
 
 def lowest_unique(int_list):
     numbers = {}
-    for index in range(len(int_list)):
-        group = numbers.setdefault(int(int_list[index]), [])
+    for index, number in enumerate(int_list):
+        group = numbers.setdefault(int(number), [])
         group.append(index)
-    for number in numbers:
+    for number in sorted(numbers.keys()):
         retval = numbers[number]
         if len(retval) == 1:
             return retval[0] + 1
Improve solution by using enumerate
