input: Write a function to generate a random string of length 8 made of uppercase letters and numbers. If the string generation is successful, print the string. If the function is called without a length parameter, it should default to generating a string of length 8.
  assert generate_random_string() == "expected_output"
  
  import string
  import random
  
  def generate_random_string(length=8):
      chars = string.ascii_uppercase + string.digits
      password = ''.join(random.choice(chars) for i in range(length))
      print(password)
  
  generate_random_string()
output: import string
  import random
  
  def generate_random_string(length=8):
      chars = string.ascii_uppercase + string.digits
      password = ''.join(random.choice(chars) for i in range(length))
      print(password)