Matching strings
- by Joy
Write the function subStringMatchExact. This function takes two arguments: a target string, and a key string. It should return a tuple of the starting points of matches of the key string in the target string, when indexing starts at 0. Complete the definition for
def subStringMatchExact(target,key):
For example,
subStringMatchExact("atgacatgcacaagtatgcat","atgc")
would return the tuple (5, 15).