input: from typing import List
  import string
  import random
  
  def generate_password():
      """ Generates a random password with minimum length of 8 characters that contains
      at least one number and one special character.
      >>> password = generate_password()
      >>> len(password) >= 8 and any(char.isdigit() for char in password) and any(char in string.punctuation for char in password)
      True
      """
      length = 8
      chars = string.ascii_letters + string.digits + string.punctuation
      password = "".join(random.choice(chars) for i in range(length))
      
      return password
  
  password = generate_password()
  print(password)
output:     
      while not (any(char.isdigit() for char in password) and any(char in string.punctuation for char in password)):
          password = "".join(random.choice(chars) for i in range(length))
      return password
  