input: Write a function generate_password that generates a random password with a minimum length of 8 characters. The password should contain at least one number and one special character.
  
  def generate_password():
   return "".join(random.choice(string.ascii_letters + string.digits + string.punctuation) for i in range(8))
  
  assert len(generate_password())==8
  assert any(char.isdigit() for char in generate_password()) 
  assert any(char in string.punctuation for char in generate_password())
output: import random
  import string
  
  def generate_password():
      while True:
          password = "".join(random.choice(string.ascii_letters + string.digits + string.punctuation) for i in range(8))
          if any(char.isdigit() for char in password) and any(char in string.punctuation for char in password):
              return password