Learn Python list and string manipulation by finding the index of a string in a list.
Write a Python function that takes as input a list of strings and a target string. The function should return the index of the target string in the list. Each element in the list has a zero-based index. ### Parameters - `lst`: A list of strings (`lst`), 1 <= len(lst) <= 1000. Each string in this list is 1 <= len(s) <= 100 in length. - `target_str`: A target string (`target_str`) that one needs to locate in the list. ### Return Value - The function returns the zero-based index of the target string (`target_str`) if it is found in the list. If not, it returns `-1`. ### Examples ```python # The string "fgh" is at index 2 in the list. index_of_string(["hi", "edabit", "fgh", "abc"], "fgh") # Outputs: 2 # The string "blue" is at index 1 in the list. index_of_string(["Red", "blue", "Blue", "Green"], "blue") # Outputs: 1 # The string "d" is at index 3 in the list. index_of_string(["a", "g", "y", "d"], "d") # Outputs: 3 # The string "Pineapple" is at index 0 in the list. index_of_string(["Pineapple", "Orange", "Grape", "Apple"], "Pineapple") # Outputs: 0 ```