input: Write a python function to generate a random password of specified length using uppercase, lowercase, and digits.
  assert len(random_password(8)) == 8
  assert len(random_password(12)) == 12
  assert isinstance(random_password(10), str)
output: import random
  import string
  
  def random_password(length):
      characters = string.ascii_letters + string.digits
      return ''.join(random.choice(characters) for _ in range(length))