input: from typing import List
  
  
  def generate_random_password(allowed_chars: str, length: int) -> str:
      """Generate a random password using the given characters and specified length.
      >>> generate_random_password("abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?", 8)
      '3Bc@dEf7'
      >>> generate_random_password("abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ", 10)
      'a2B3dE4fG5'
      """
      import random
      return "".join(random.sample(allowed_chars, length))
output:     import random
      return "".join(random.choice(allowed_chars) for _ in range(length))