input: Write a python function to generate a random string of specified length using letters and digits.
  assert len(random_string(10)) == 10
  assert len(random_string(20)) == 20
  assert len(random_string(5)) == 5
output: import random
  import string
  
  def random_string(length):
      characters = string.ascii_letters + string.digits
      return ''.join(random.choice(characters) for _ in range(length))