title: Using an if statement to pass through variables ot further functions for python
body: <p>I am a biologist that is just trying to use python to automate a ton of calculations, so I have very little experience.</p>
  
  <p>I have a very large array that contains values that are formatted into two columns of observations. Sometimes the observations will be the same between the columns:<br>
  v1,v2<br>
  x,y<br>
  a,b<br>
  a,a<br>
  x,x<br></p>
  
  <p>In order to save time and effort I wanted to make an if statement that just prints 0 if the two columns are the same and then moves on. If the values are the same there is no need to run those instances through the downstream analyses.</p>
  
  <p>This is what I have so far just to test out the if statement. It has yet to recognize any instances where the columns are equivalen.</p>
  
  <p>Script:</p>
  
  <pre>mylines=[]
  
  with open('xxxx','r') as myfile:
      for myline in myfile:
          mylines.append(myline)             ##reads the data into the two column format mentioned above
  
  rang=len(open ('xxxxx,'r').readlines( ))   ##returns the number or lines in the file
  
  for x in range(1, rang):<br>
      li = mylines[x]         ##selected row as defined by x and the number of lines in the file
      spit = li.split(',',2)  ##splits the selected values so they can be accessed seperately
      print(spit[0])          ##first value
      print(spit[1])          ##second value
  
      if spit[0] == spit[1]:
          print(0)
      else:
          print('Issue')</pre>
  
  <p>Output:
  192Alhe52
  192Alhe52</p>
  
  <p>Issue  ##should be 0</p>
  
  <p>188Alhe48
  192Alhe52</p>
  
  <p>Issue</p>
  
  <p>191Alhe51
  192Alhe52</p>
  
  <p>Issue</p>
  
  <p>How do I get python to recgonize that certain observations are actually equal? </p>