input: Write a function to generate a random string of length 8 made of uppercase letters and numbers. If the given length is 0, return an empty string.
  def generate_random_string(length):
      if length == 0:
          return ""
      chars = string.ascii_uppercase + string.digits
      password = ''.join(random.choice(chars) for i in range(length))
      return password
  
  assert generate_random_string(8) != generate_random_string(8)  # This will usually be True if the function works
  assert generate_random_string(0) == ""
  assert len(generate_random_string(8)) == 8
output: def generate_random_string(length):
      if length == 0:
          return ""
      chars = string.ascii_uppercase + string.digits
      password = ''.join(random.choice(chars) for i in range(length))
      return password