I'm trying to open a file via a function's parameter. The function I'm trying to make is going to be a multi-purpose one that will work with different files.
def word_editor(open(filename, 'f'))
Would this be the correct way to open it? filename will represent whatever file I am opening.