mycookbook= [["i", "love", "tim", "tam", "and", "chocolate", "ice", "cream"], ["cooking", 
"fresh", "vegetables", "is", "easy"], ["fresh", "vegetables", "and", "fruits", "are", "good", 
"for", "health"]]
mylist = ["tim tam", "chocolate ice cream", "fresh vegetables and fruits"]

for sentence in mycookbook:
    i = 0
    while i < len(sentence):
        for j in range(i + 1, len(sentence)+1):
            phrase = ' '.join(sentence[i:j])
            if phrase in mylist:
                sentence[i:j] = [phrase]
                break
        i += 1

print(mycookbook)