title: Checking if any character in a string is alphanumeric
body: <p>I want to check if any character in a string is alphanumeric. I wrote the following code for that and it's working fine: </p>
  
  <pre><code>s = input()
  
  temp = any(i.isalnum() for i in s)
  print(temp)
  </code></pre>
  
  <p>The question I have is the below code, how is it different from the above code: </p>
  
  <pre><code>for i in s:
      if any(i.isalnum()):
          print(True)
  </code></pre>
  
  <p>The for-loop iteration is still happening in the first code so why isn't it throwing an error?  The second code throws:</p>
  
  <blockquote>
    <p>Traceback (most recent call last):
      File "", line 18, in 
      TypeError: 'bool' object is not iterable</p>
  </blockquote>