input: Write a function to generate a random password using a predefined set of letters, numbers, and characters. The function should randomly select characters from the given set and return a password of a specified length.
  
  import random
  
  def generate_password(length=8):
      string = "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?"
      password = "".join(random.sample(string, length))
      return password
  
  assert generate_password() != generate_password()
  assert len(generate_password(10)) == 10
  assert len(generate_password(15)) == 15
  assert all(c in "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?" for c in generate_password())
  assert isinstance(generate_password(), str)
output: def generate_password(length=8):
      string = "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?"
      password = "".join(random.sample(string, length))
      return password