writes the word from a sentence in a block to a file with the id

def _writeWordFromSentenceInBlock(word, blockID, sentenceID, wordID):
    '''writes the word from a sentence in a block to a file with the id'''
    with open("wordIDs.txt", "a") as fp:
        fp.write("wordID: " + str(blockID) + "_" +
                 str(sentenceID) + "_" + str(wordID) + "\n")
        fp.write("wordString: " + word + "\n")
        fp.write("\n")