# Write a function that takes a string and a substring # and removes all instances of the substring, # returning that new resultant string. # You may assume the substring is of size 1 # # You may not use any built-in functions/methods # besides len() and .append(). # Specifically, you may NOT use the replace() method. def remove_string(string, sub): result = "" for index in range(len(string)): if (string[index] != sub): result += string[index] return result print(remove_string("introduction to python", "n")) # what if substring is longer -- says 2, 3, .. characters long # how should we modify the code