# Write a Python program to Remove after substring in String # Python3 code to demonstrate working of # Remove after substring in String# Using index() + len() + slicing  # initializing stringstest_str = 'geeksforgeeks is best for geeks'  # printing original stringprint("The original string is : " + str(test_str))  # initializing sub string sub_str = "best"  # slicing off after length computationres = test_str[:test_str.index(sub_str) + len(sub_str)]  # printing result print("The string after removal : " + str(res)) 