I am trying to write output of one module in a output file of another module. For example,
first module :
def sentence_token():
# some code
sentences = sentence_tokenizer(tokens)
count_sentence = f"total count of sentence is {len(sentences)}"
second module :
def word_pos_definition():
# some code
word_pos_definition_content = []
with open('get_para_report.csv', 'w') as final_csv_file:
final_csv_file.write('\n'.join(word_pos_definition_content))
I need the count_sentence
in first module write with get_para_report.csv
in second module. Anyone have any idea, would help alot. Thanks!
count_sentence
, a string, writing "with" a file in another module. can you please explain more?count_sentence
, i will get result liketotal count of sentence is 4
total count of sentence is 4
inget_para_report.csv