Find the k most frequent words from a file python. count('\n') #call split with no arguments words = s.