title: check if string contains special characters in python
body: <p>I want to check if a password contains special characters. I have googled for a few examples but cant find that addresses my problem. How do I do it? Here is how I am trying it so far;</p>
  
  <pre><code>elif not re.match("^[~!@#$%^&amp;*()_+{}":;']+$",password)
          print "Invalid entry."
          continue
  </code></pre>
  
  <p>My string is password.</p>