title: Python - Finding all non alpha-numeric characters in a string
body: <p>I'm designing a system that allows users to input a string, and the strength of the string to be determined by the amount of non alphanumeric characters. Points should be awarded like so: +1 for every non-alnum character to a maximum of 3 non-alnum characters. </p>
  
  <pre><code>def non_alnum_2(total,pwd):
  count = 0
  lid = 3
  number = 0
  if pwd[count].isalnum():
      if True:
          print "Nope"
      if False:
          print "Good job"
          count = count + 1
          number += 1
  if number &gt; lid:
      number = lid
  return number
  
  total = 0
  number = 0
  pwd = raw_input("What is your password? ")
  
  non_alnum_2(total, pwd)
  print total
  total += number
  </code></pre>
  
  <p>I've only just started coding, so I'm sorry if this seems like a very junior question. </p>