input: Write a function to generate a random string of length 8 made of uppercase letters and numbers. Return the generated string as the output.
  assert generate_random_string()=="A1B2C3D4"
  assert generate_random_string()=="X9Y8Z7W6"
  assert generate_random_string()=="1A2B3C4D"
  assert generate_random_string()=="Q5R6S7T8"
  assert generate_random_string()=="E9F8G7H6"
output: import random
  import string
  
  def generate_random_string():
      return ''.join(random.choices(string.ascii_uppercase + string.digits, k=8))