input: Write a function to generate a random string of length 8 made of uppercase letters and numbers. If the length of the string is not specified, the default length should be 8.
  assert generate_random_string()=='A2F5G9H1'
  assert generate_random_string(length=10)=='B3D7E9F2H4'
output: import random
  import string
  
  def generate_random_string(length=8):
      return ''.join(random.choices(string.ascii_uppercase + string.digits, k=length))