input: Write a function to generate a random password with a minimum length of 8 characters, which should include at least one number and one special character.
  assert len(generate_password()) >= 8
  assert any(c.isdigit() for c in generate_password())
  assert any(c in string.punctuation for c in generate_password())
  print(generate_password())
output: import random
  import string
  
  def generate_password():
      min_length = 8
      special_chars = string.punctuation
      digits = string.digits
      all_chars = string.ascii_letters + special_chars + digits
      
      password = [
          random.choice(digits),
          random.choice(special_chars)
      ]
      
      password += random.choices(all_chars, k=min_length - len(password))
      random.shuffle(password)
      
      return ''.join(password)