We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
With python 3 you can make use of the collections.Counter.
Like other comments already stated, make sure to read the input using sys.stdin.read() and lowercase the text. Everything else is very straight forward.
The Trigram
You are viewing a single comment's thread. Return to all comments →
With python 3 you can make use of the
collections.Counter
.Like other comments already stated, make sure to read the input using
sys.stdin.read()
and lowercase the text. Everything else is very straight forward.A possible solution could look like this: