I have two funcions that both open the same file, read and modify it like so:
def add_in_the_right_place(what, where, path): with open(path, "r"