input: Write a function to generate a random password with a minimum length of 8 characters that contains at least one number and one special character. If the given input is not applicable then return the password.
  assert generate_password()==True
  assert len(generate_password())>=8==True
  assert any(char.isdigit() for char in generate_password())==True
  assert any(char in string.punctuation for char in generate_password())==True
output: import random
  import string
  
  def generate_password():
      password = []
      password.append(random.choice(string.digits))
      password.append(random.choice(string.punctuation))
      password.extend(random.choices(string.ascii_letters + string.digits + string.punctuation, k=6))
      random.shuffle(password)
      return ''.join(password)