# function with three arguments def dynamic_glyph(previous_module, current_module, module): text = module[1] print("starting to write the text-file") #file to write the result to textFile = open("dynamic_glyph.txt", "wt") # wt = write text mode # write the new text to the file textFile.write(text) #close input and output files textFile.close()