input: Write a python function to generate a random string of 10 characters using uppercase letters, lowercase letters, and digits.
  assert len(generate_string()) == 10
  assert generate_string().isalnum()
  assert any(c.islower() for c in generate_string())
  assert any(c.isupper() for c in generate_string())
output: import random
  import string
  
  def generate_string():
      characters = string.ascii_letters + string.digits
      return ''.join(random.choice(characters) for _ in range(10))