input: Write a function to generate a random string of length 8 containing alphanumeric characters. The function should return the randomly generated string.
  assert generate_random_string(8).isalnum()==True
  assert len(generate_random_string(8))==8
  assert generate_random_string(8).islower()==False
output: import random
  import string
  
  def generate_random_string(length):
      return ''.join(random.choices(string.ascii_letters + string.digits, k=length))