+ 1
2nd most frequent word in a string
Can anyone make a program which prints 2nd most frequent word used in a string in python language
1 Respuesta
+ 7
Python has a module for that, collections.Counter. Used on a string, Counter() will count the frequency of each letter. Used on a list with the single words of the string, it will count the words.