title: Python - using returns in conditional statements
body: <p>I want to use return instead of print statements but when I replace the print statements with return I don't get anything back. I know I'm missing something obvious:</p>
  
  <pre><code>def consecCheck(A):
      x = sorted(A)
      for i in enumerate(x):
          if i[1] == x[0]:
              continue
          print x[i[0]], x[i[0]-1]
          p = x[i[0]] - x[i[0]-1]
          print p
          if p &gt; 1:
              print "non-consecutive"
              break
          elif x[i[0]] == len(x):
              print "consecutive"
  
  if __name__ == "__main__":
      consecCheck([1,2,3,5])
  </code></pre>
  
  <p>-----UPDATE------ HERE IS CORRECTED CODE AFTER TAKING HEATH3N's answer:</p>
  
  <pre><code>def consecCheck(A):
      x = sorted(A)
      for i in enumerate(x):
          if i[1] == x[0]:
              continue
          print x[i[0]], x[i[0]-1]
          p = x[i[0]] - x[i[0]-1]
          print p
          if p &gt; 1:
              a = "non-consecutive"
              break
          elif x[i[0]] == len(x):
              a = "consecutive"
      return a
  
  if __name__ == "__main__":
      print consecCheck([4,3,7,1,5])
  </code></pre>