title: Python Simple Program
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/9596739/python-simple-program">Python Simple Program</a>  </p>
  </blockquote>
  
  
  
  <p>I am a new at programming and trying to learn python. I am trying to write a simple code but getting hard time. </p>
  
  <p>so this is input text file</p>
  
  <blockquote>
    <p>A 1 2 3 4</p>
    
    <p>B 5 6 7 8</p>
    
    <p>C 9 10 11 12</p>
  </blockquote>
  
  <p>Can someone help me with how can I output element of second and third column corresponding to the element of first column which I will enter? In other words, how should I write a program so when I enter "B" when programs asks me to enter a letter, program will out put "5" and "6" which are elements of second and third column corresponding to "B". </p>
  
  <p>At least can someone give me some kind of hint on it, how can I approach this?</p>
  
  <p>so far I have:</p>
  
  <pre><code>f=open('path of a file','r')
  
  for line in f.readlines():
  
      data = line.split(' ')
      if len(data) == 5:
          #print data[0]
          letter=raw_input("Enter the letter")
          print letter
  </code></pre>