title: python reading file into datastructure
body: <p>I have a TXT file like <a href="https://pastebin.com/SVjVTPTA" rel="nofollow noreferrer">https://pastebin.com/SVjVTPTA</a>.</p>
  
  <p>How can I read the x and y values into some kind of data structure eg a 2d array or dictionary?</p>
  
  <p>I tried this but it does not work:</p>
  
  <pre><code>f= open('text.txt', 'r')
  newDict = {}
  for line in f:
      n, r, t = line.strip().split(' ')
      newDict[k.strip()] = v.strip()
  </code></pre>
  
  <p>If you have a better and more concise solution then my attempt, please post here for this poor buddy. Please have mercy on me, I am a beginner in python and using computers!</p>