title: Python password strength
body: <p>I am programming a password strength code on python and i'm trying to find out if my password (<code>p</code>) contains a number, I have found out how to see if it contains upper and lower case letter by <code>p.isupper()</code> or <code>p.islower()</code>. I have also put them two together. My friend has told me how to see if the password only contains number but I need your help now.</p>
  
  <pre><code>running=True
  while running:
      p=raw_input("What is your Password? ")
      if len(p) &lt;6:
          print "Your Password is too short"
      if len(p) &gt;12:
          print "Your Password is too long"
      if len(p) == 6 or 7 or 8 or 9 or 10 or 11 or 12:
          print "Password Length OK"
          running=False
  
  print "Loop Broken" #this will be deleted, only for my help now
  
  if p.isupper():
      print "Your Password is weak as it only contains capital letters"
  
  if p.islower():
      print "Your Password is weak as it only contains lower case letters"
  
  if p.isupper and p.islower:
      print "Your Password is of medium strength, try adding some numbers"
  
  try:
      int(p)
      print "Your Password is weak as it only contains numbers"
  except (ValueError, TypeError):
      pass
  </code></pre>
  
  <p>All I need now is the code for, if the password contains lower or upper case letters and numbers.</p>