input: Write a python function to generate a random password of 10 characters containing both letters and digits.
  assert len(random_password()) == 10
  assert any(c.isdigit() for c in random_password())
  assert any(c.isalpha() for c in random_password())
output: import random
  import string
  
  def random_password():
      characters = string.ascii_letters + string.digits
      password = ''.join(random.choice(characters) for _ in range(10))
      return password