title: Read specific line from text file and assign to variable using Python 2.7
body: <p>I want to automatically search for 3 lines of text in a text file and then assign it as variables in a python script. The process basically consist of tkinter promting the user to select the text file and then the three lines are located in the text file and assigned as variables. The three lines of text required will always be in the same location in the text file (eg. it will always be lines 10, 11 and 12). Below is what I was able to do, however this only prints the whole text file.</p>
  
  <pre><code>#set bounds
  bounds=tkFileDialog.askopenfile(title='Select bounds text file:',filetypes=[("Text files","*.txt")])
  
  rbounds=bounds.readlines()
  for line in rbounds:
      print line
  </code></pre>
  
  <p>The print statement at the end is to see what the results are after running the script.
  How do I go about splitting or slicing the lines in the text file and then assigning it to variables?</p>