title: How to separate iterables by tab instead of element in Python
body: <p>I'm trying to build a very simple program to turn data that looks like this: </p>
  
  <pre><code>ID  Freq
  1   2
  2   3
  3   4
  4   5
  5   1
  6   1
  7   1
  8   1
  9   1
  10  1
  11  2
  12  2
  13  2
  14  3
  15  3
  16  3
  17  4
  18  5
  19  5
  20  5
  21  5
  22  5
  23  5
  24  5
  </code></pre>
  
  <p>into two lists in python. This is the for loop I've written: </p>
  
  <pre><code>newlist = []
  ID = []
  
  for line in f:
      if len(line.strip())&gt;0:
          l=line.strip().split("\t")
          for i in l[1]:
              newlist+=[i]
          for i in l[0]:
              ID+=[i]
  
  print(newlist)
  print(ID)
  </code></pre>
  
  <p>The problem is it outputs each digit in the multiple digit numbers (e.g. 10 and over in the variable "ID") as a separate element. </p>
  
  <p>e.g: </p>
  
  <pre><code>['1', '2', '3', '4', '5', '6', '7', '8', '9', '1', '0', '1', '1', '1', '2', '1', '3', '1', '4', '1', '5', '1', '6', '1', '7', '1', '8', '1', '9', '2', '0', '2', '1', '2', '2', '2', '3', '2', '4']
  </code></pre>
  
  <p>Instead of this: </p>
  
  <pre><code>['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24']
  </code></pre>
  
  <p>I've looked at the unzip function for tuples, but this is different as the data are not tuples. Rather, the issue is getting python to read each two-digit number as one iterable, rather than each digit as an iterable.</p>