so i have to write a code that examines a given file of words and places it into another file. the system has engrained open and close functions and print/retu functions. I currently have a function for targeting words that start with a specific letter and need help editing it to target words that end with a certain letter, rhyme with a given word, and contain a given string. here is my code that works for the first part!
def getListBegin(c,ifile,ofile): newline= '' for word in ifile: if word.startswith(c): ofile.write(newline + word.strip()) newline = 'n'
the newline and wordstrip are so the list of words in ofile don't end with a new line.
