input: Write a function to generate a random password using a set of predefined letters, numbers, and special characters. The function should return the generated password as a string.
  
  import random
  
  def generate_password(length=8):
      string = "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?"
      password = "".join(random.sample(string, length))
      return password
  
  assert generate_password(8) != generate_password(8)
  assert len(generate_password(8)) == 8
  assert generate_password(12) != generate_password(12)
  assert len(generate_password(12)) == 12
output: def generate_password(length=8):
      string = "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?"
      password = "".join(random.sample(string, length))
      return password