input: Write a python function to generate a random string of specified length containing letters and digits.
  assert len(randomString(8)) == 8
  assert len(randomString(12)) == 12
  assert all(c.isalnum() for c in randomString(10))
output: import random
  import string
  
  def randomString(length):
      characters = string.ascii_letters + string.digits
      return ''.join(random.choice(characters) for _ in range(length))