Question d’entretien chez Microsoft

Write how tfidf works and try to implement it using python?