title: Can my password strength checker program be reduced
body: <p>I made a password strength checker
  Code:</p>
  
  <pre><code>import re
  
  upper = re.compile(r'[A-Z]')
  lower = re.compile(r'[a-z]')
  digit = re.compile(r'[0-9]')
  special_char = re.compile(r'[~!@#$%^&amp;*()]')
  
  # text = 'd3F#$%^&amp;232sdsGDFD'
  text = input("Enter a password to check it's strength\n")
  
  digit_check = digit.search(text)
  upper_check = upper.search(text)
  lower_check = lower.search(text)
  special_char_chk = special_char.search(text)
  
  if digit_check and upper_check and lower_check and special_char_chk and len(text)&gt;=8:
      print("Valid password\nPassword is:" + text)
  else:
      print("Innvalid")
  </code></pre>
  
  <p>I tried to make it as short at my level.
  How far can I reduce the number of code lines?</p>