title: Why function gives difference results with print and return
body: <p>If i code:</p>
  <pre><code>a = [56, 2, 5, 2, 5, 2, 6, 2, 6, 2, 56, 2, 6, 2, 52, 5, 2]
  
  
  def func1(a3):
      for i in range(len(a)-1):
          if a[i] + a[i+1] == 58:
              print(a[i])
  func1(a)
  </code></pre>
  <p>I get in output:
  56
  2
  56</p>
  <p>But if i code return a[i] instead of print(a[i]) i get only first suitable number
  How can i fix it?</p>