'Function to append a given statement to
the given file'

def write_to_file(self, filename, elements):

    currFile = open(filename, 'a')
    for e in elements:
        currFile.write(elements[e])
    currFile.close()
