title: How can I make the if function in python try the values from the range for "a" and return the correct answer
body: <pre class="lang-py prettyprint-override"><code>a = list(range(0,10))
  
  if a + 6 == 10:
      print(a)
  </code></pre>
  <p>I am trying to make the numbers between 0 and 10 be individually substituted into <code>a</code> and when it finds the right answer then it will stop and return the value of <code>a</code>. So, in this case, just to return <code>4</code>.</p>
  <p>I keep getting this error</p>
  <blockquote>
  <pre><code>can only concatenate list (not &quot;int&quot;) to list
  </code></pre>
  </blockquote>