Python - Start and End Indices of words from list in String
Given a String, our task is to write a Python program to extract the start and end index of all the elements of words of another list from a string. Input : test_str = "gfg is best for all CS geeks and engineering job seekers", check_list = ["geeks", "engineering", "best", "gfg"]Output : {'geeks': [