input: Write a function to generate a random string of 10 characters from a predefined set of characters. If the provided length is not 10, the function should return an empty string.
  assert generate_string(10) != ''
  assert generate_string(15) == ''
  assert generate_string(0) == ''
  assert len(generate_string(10)) == 10
output: import random
  import string
  
  def generate_string(length):
      if length != 10:
          return ''
      return ''.join(random.choices(string.ascii_letters, k=10))