input: Write a function to generate a random string of specified length made of uppercase letters and numbers. The function should take an integer parameter representing the length of the string and return the generated string.
  
  import string
  import random
  
  def generate_random_string(length):
      chars = string.ascii_uppercase + string.digits
      return ''.join(random.choice(chars) for _ in range(length))
  
  assert generate_random_string(8) != generate_random_string(8)  # Since random, output will be different each time
  assert len(generate_random_string(5)) == 5
  assert len(generate_random_string(10)) == 10
  assert len(generate_random_string(0)) == 0
output: import string
  import random
  
  def generate_random_string(length):
      chars = string.ascii_uppercase + string.digits
      return ''.join(random.choice(chars) for _ in range(length))