input: Write a function to generate a password which satisfies all the criteria including at least one lower case letter, one upper case letter, one special character, and one number.
  assert len(generate_password()) == 8
  assert satisfy_criteria(generate_password())
  assert len(generate_password()) == 8
output: import random
  import string
  
  def generate_password():
      lower = random.choice(string.ascii_lowercase)
      upper = random.choice(string.ascii_uppercase)
      digit = random.choice(string.digits)
      special = random.choice(string.punctuation)
      
      remaining = ''.join(random.choices(string.ascii_letters + string.digits + string.punctuation, k=4))
      
      password = lower + upper + digit + special + remaining
      
      password_list = list(password)
      random.shuffle(password_list)
      
      final_password = ''.join(password_list)
      return final_password[:8]
      
  def satisfy_criteria(password):
      has_lower = any(c.islower() for c in password)
      has_upper = any(c.isupper() for c in password)
      has_digit = any(c.isdigit() for c in password)
      has_special = any(c in string.punctuation for c in password)
      
      return has_lower and has_upper and has_digit and has_special