""" Use this file to develop and test your Assignment 3 functions S0, 2020.""" def main(): print_header(5, "alter_the_list()") test_alter_the_list() #-------------------------------------------------- # 5555555555555555555555555555555555555555555555555 # Remove from the parameter list of words all words # which are in the parameter sentence # and in the list of words #-------------------------------------------------- """ Define the alter_the_list() function which is passed a string of text and a list of words as parameters. The function removes any word from the parameter list of words which is a separate word in the parameter string of text. The string of text should be converted to lower case before you do any checking as the elements of the parameter list of words are all in lower case. Note that there is no punctuation in the parameter string of text. Note that each word in the parameter list of words is unique, i.e., it occurs only once. For example, the following code: word_list = ["a", "is", "bus", "on", "the"] alter_the_list("A bus station is where a bus stops A train station is where a train stops On my desk I have a work station", word_list) print("1.", word_list) word_list = ["a", 'up', "you", "it", "on", "the", 'is'] alter_the_list("It is up to YOU", word_list) print("2.", word_list) word_list = ["easy", "come", "go"] alter_the_list("Easy come easy go go go", word_list) print("3.", word_list) word_list = ["a", "is", "i", "on"] alter_the_list("", word_list) print("4.", word_list) word_list = ["a", "is", "i", "on", "the"] alter_the_list("May your coffee be strong and your Monday be short", word_list) print("5.", word_list) prints: 1. ['the'] 2. ['a', 'on', 'the'] 3. [] 4. ['a', 'is', 'i', 'on'] 5. ['a', 'is', 'i', 'on', 'the'] """ def alter_the_list(text, word_list): pass def test_alter_the_list(): word_list = ["a", "is", "bus", "on", "the"] alter_the_list("A bus station is where a bus stops A train station is where a train stops On my desk I have a work station", word_list) print("1.", word_list) word_list = ["a", 'up', "you", "it", "on", "the", 'is'] alter_the_list("It is up to YOU", word_list) print("2.", word_list) word_list = ["easy", "come", "go"] alter_the_list("Easy come easy go go go", word_list) print("3.", word_list) word_list = ["a", "is", "i", "on"] alter_the_list("", word_list) print("4.", word_list) word_list = ["a", "is", "i", "on", "the"] alter_the_list("May your coffee be strong and your Monday be short", word_list) print("5.", word_list) #-------------------------------------------------- # Print header lines #-------------------------------------------------- def print_header(number, text): text = str(number) + ". " + text print("-" * 30) print(str(number) * 30) print(text) print("-" * 30) main()