I have been working on finding total tf-idf values of each files from a list of files. So far i've calculated tf-idf values of all words in each file (inside for w in words). Now i want to add the tf-idf value of each word which ultimately gives the tf-idf value for a particular file f. I am somewhat new in Python and i am experiencing some problem in doing so . Any suggestion would be highly appreciated. (for python 2.7)
for f in file_list:
(some code)
for w in words:
(some code)
tf_idf = tf_value * idf_value