input: from typing import List
  
  def generate_password() -> str:
      """ Generate a random password with a minimum length of 8 characters,
      containing at least one number and one special character.
      >>> generate_password()
      'A1!aB2$c'
      >>> generate_password()
      'Z9@xD5#e'
      """
      length = 8
      chars = string.ascii_letters + string.digits + string.punctuation
      password = "".join(random.choice(chars) for i in range(length))
      return password
output:     while True:
          if any(char.isdigit() for char in password) and any(char in string.punctuation for char in password):
              break
          password = "".join(random.choice(chars) for i in range(length))
      return password