title: Python - reading file to dictionary
body: <p>I have a .txt file that looks like this:</p>
  
  <pre><code>Key1    Key2    Key3
  Val1-A  Val2-A  Val3-A
  Val1-B  Val2-B  Val3-B
  ....
  </code></pre>
  
  <p>Each field is separated by tab, how can I read the file and store it in a dictionary of lists without using any kind of for/while loop? Comprehensions are allowed</p>
  
  <pre><code>with open("file.txt", "r") as input:
      #comprehension here
  </code></pre>
  
  <p>Thanks!</p>
  
  <p>EDIT: sorry I forgot to include my attempt so far</p>
  
  <pre><code> try:
      with open("file.txt", "r") as input:
          line = input.readline()
          line = re.split(r '\t+', line)
          myDict = dict(line.strip() for line in infile)
          if line == "":
              raise ValueError            
   except IOError:
      print ("Error! File is not found.")
   except ValueError:
      print("Error! File is empty.")
  </code></pre>