input: Write a python function to print the index and value of each non-empty string in a list.
  assert print_items_with_index(['apple', 'banana', 'cat', 'dog', 'elephant']) == "item 0 is apple\nitem 1 is banana\nitem 2 is cat\nitem 3 is dog\nitem 4 is elephant\n"
  assert print_items_with_index(['hello', 'world']) == "item 0 is hello\nitem 1 is world\n"
  assert print_items_with_index(['python', 'java', 'c++']) == "item 0 is python\nitem 1 is java\nitem 2 is c++\n"
output: def print_items_with_index(lst):
      result = ""
      for index, value in enumerate(lst):
          if value:
              result += f"item {index} is {value}\n"
      return result