input: 
  from random import sample
  
  
  def generate_random_password(string: str, length: int) -> str:
      """ Generate a random password from the given set of characters and specified length.
      >>> generate_random_password("abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?", 8)
      '#g3BxT7m'
      >>> generate_random_password("ABCD1234567", 4)
      '2C6B'
      """
      return "".join(sample(string, length))
  
output:     return "".join(sample(string, length))