input: Write a function to generate a random password given a set of letters, numbers, and characters. The function should return the generated password as a string. If no set of characters is provided, the function should use the default set of characters including lowercase letters, uppercase letters, digits, and special characters.
  def generate_password(characters=None):
      if characters is None:
          characters = "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?"
      password = "".join(random.sample(characters, 8))
      return password
  
  assert generate_password("ABCDabcd1234!@#$") != generate_password("ABCDabcd1234!@#$")
  assert len(generate_password()) == 8
  assert any(c.islower() for c in generate_password())
  assert any(c.isupper() for c in generate_password())
  assert any(c.isdigit() for c in generate_password())
  assert any(c in "!@#$%^&*()" for c in generate_password())
  assert generate_password() != generate_password()
output: def generate_password(characters=None):
      if characters is None:
          characters = "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?"
      password = "".join(random.sample(characters, 8))
      return password