title: Python split function. Too many values to unpack error
body: <p>I have a python function that must read data from file and split it into two key and value, and then store it in dictionary. Example:
  file:</p>
  
  <pre><code>http://google.com 2
  http://python.org 3
  # and so on a lot of data
  </code></pre>
  
  <p>I use the split function for it, but when there is really a lot of data it raises value error</p>
  
  <pre><code>ValueError: too many values to unpack
  </code></pre>
  
  <p>What can I do about this ?</p>
  
  <p>This is the exact code that fails</p>
  
  <pre><code>with open(urls_file_path, "r") as f:
      for line in f.readlines():
          url, count = line.split()# fails here
          url_dict[url] = int(count)
  </code></pre>