S&P Global interview question

Python coding find frequency of word in character Remove duplicate element from list