title: How to print out specific rows/lines in a text file based on a condition (greater than or less than)
body: <p>I am trying to code a program that prints out the specific rows/lines where one value exceeds the other one in that line. For example ,this is a small part of  the text file:</p>
  
  <pre><code>01,test1,202,290,A,290
  
  02,test2,303,730,A,0
  
  03,test3,404,180,N,180
  </code></pre>
  
  <p>The program that I am trying to code would select all lines that have 'A' in them but also select the lines where the 4th column (290 for the first line) is greater then the 6th column (290 in the first line)and then print them.So the program should only print this line in the text file above in python:</p>
  
  <pre><code>02,test2,303,730,A,0
  </code></pre>
  
  <p>The best I can do is simply print all lines that have 'A' in them by using:</p>
  
  <pre><code>F = open("TEST.txt").read()
    for line in F.split():
      if 'A' in line:
        Column=line.split(',')
  </code></pre>
  
  <p>However this only selects the lines with 'A' in them ,when I attempt to filter it based on whether the 4th column is greater then the 6th column,I get various errors.Can somebody please help me with this problem?</p>