input: 
  from typing import List
  from random import choice
  from string import ascii_uppercase, digits
  
  
  def generate_random_string(length: int) -> str:
      """Generate a random string of specified length using uppercase letters and digits.
      >>> generate_random_string(8)
      'A1B2C3D4' # Example output, actual output will be random
      >>> generate_random_string(12)
      'X9Y8Z7W6V5U4' # Example output, actual output will be random
      """
      chars = ascii_uppercase + digits
      return ''.join(choice(chars) for _ in range(length))
  
output:     chars = ascii_uppercase + digits
      return ''.join(choice(chars) for _ in range(length))