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. Make sure the generated string contains only uppercase letters and digits.
  assert generate_random_string()=='A8B5C2D1'
  assert generate_random_string()=='X3Y7Z9Q6'
  assert generate_random_string()=='E4F2G8H3'
  assert generate_random_string()=='J5K2L7M1'
  assert generate_random_string()=='N6O3P9Q7'
output: import random
  import string
  
  def generate_random_string():
      return ''.join(random.choices(string.ascii_uppercase + string.digits, k=8))