title: Python: Unique numbers in string
body: <p>I would like to retain the unique integer in the second column and print the entry in the previous (first) column. But I am having trouble converting a string to an integer and get the error: <strong>TypeError: 'int' object is not iterable</strong></p>
  
  <p><strong>Input File</strong></p>
  
  <pre><code>    A     1     108.80
      A     1       8.33
      B     2      45.10
      B     2       3.96
      B     2       3.94
      A     3       1.96
      A     3       2.94
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <pre><code>A
  B
  A
  </code></pre>
  
  <p><strong>Script</strong></p>
  
  <pre><code>with open('test.pdb') as infile:
          for line in infile:
                  data = int(line.split()[1])
                  seen = set()
                  for number in range(data):
                          unique = [x for x in number if x not in seen]   
                          seen.update(unique)
                          print(unique)
  </code></pre>