input: Write a function to generate a random string of length 8 made of uppercase letters and numbers. The function should return the generated string.
  assert generate_random_string()=="A1B2C3D4"
  assert generate_random_string()=="X9Y8Z7W6"
  assert generate_random_string()=="M5N4O3P2"
  assert generate_random_string()=="Q1R2S3T4"
  assert generate_random_string()=="U5V6W7X8"
output: import random
  import string
  
  def generate_random_string():
      return ''.join(random.choices(string.ascii_uppercase + string.digits, k=8))