title: Text to dictionary and print multiple values
body: <p>I have a text file like this:</p>
  
  <pre><code>key1: value1 value2 value 3
  key2: value1 value2 value 3
  key3: value1 value2 value 3
  </code></pre>
  
  <p>I am trying to open it as a dictionary and print the list of keys and values so it looks like this in the end:</p>
  
  <pre><code>key1 value1
  key1 value2
  key1 value3
  key2 value1
  key2 value2
  key2 value3
  </code></pre>
  
  <p>I am trying the following code:</p>
  
  <pre><code>f = open('groups_4.txt', 'r')
  answer = {}
  for line in f:
      k, v = line.strip().split(':')
      answer[k.strip()] = v.strip()
      print(k+'\t'+'\n{0}\t'.format(k).join(v))
  f.close()
  </code></pre>
  
  <p>However it gives me an output like this:</p>
  
  <pre><code>key1 v
  key1 a
  key1 l
  key1 u …
  </code></pre>
  
  <p>Any idea what I am doing wrong??</p>