input: Write a function in Python to create a random string of 10 characters.
  
  def generate_string():
      random_characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
      random_string = ''.join(random.choices(random_characters, k=10))
      return random_string
  
  assert len(generate_string()) == 10
  assert any(char.isdigit() for char in generate_string()) == True
  assert any(char.isalpha() for char in generate_string()) == True
output: def generate_string():
      random_characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
      random_string = ''.join(random.choices(random_characters, k=10))
      return random_string