input: from typing import List
  
  def generate_random_string(length: int, allowed_chars: List[str]) -> str:
      """ Generates a random string of the specified length using the provided list of allowed characters.
      >>> generate_random_string(8, list(string.ascii_uppercase + string.digits))
      'X3W5YZ9O'
      """
      import random
      return ''.join(random.choice(allowed_chars) for i in range(length))
output:     import random
      return ''.join(random.choice(allowed_chars) for i in range(length))