# Write a Python program to Remove Reduntant Substrings from Strings List # Python3 code to demonstrate working of# Remove Reduntant Substrings from Strings List# Using enumerate() + join() + sort()# initializing listtest_list = ["Gfg", "Gfg is best", "Geeks", "Gfg is for Geeks"]# printing original listprint("The original list : " + str(test_list))# using loop to iterate for each stringtest_list.sort(key = len)res = []for idx, val in enumerate(test_list):         # concatenating all next values and checking for existence    if val not in ', '.join(test_list[idx + 1:]):        res.append(val)# printing resultprint("The filtered list : " + str(res))