input: Write a function to generate a random string of length 8 made of uppercase letters and numbers.
  import string
  import random
  
  def generate_random_string(length=8):
      chars = string.ascii_uppercase + string.digits
      return ''.join(random.choice(chars) for i in range(length))
  
  assert generate_random_string()
  assert len(generate_random_string()) == 8
  assert all(c in string.ascii_uppercase + string.digits for c in generate_random_string())
output: import string
  import random
  
  def generate_random_string(length=8):
      chars = string.ascii_uppercase + string.digits
      return ''.join(random.choice(chars) for i in range(length))