Solve problem "Number of occurrences" online - Learn Python 3 - Snakify

## Statement

The text is given in a single line. For each word of the text count the number of its occurrences before it.

A word is a sequence of non-whitespace characters. Two consecutive words are separated by one or more spaces. Punctiation marks are a part of a word, by this definition.

In all the problems input the data using input() and print the result using print().

## Tests

one two one tho three
0 0 1 0 0
She sells sea shells on the sea shore; The shells that she sells are sea shells I'm sure. So if she sells sea shells on the sea shore, I'm sure that the shells are sea shore shells.
0 0 0 0 0 0 1 0 0 1 0 0 1 0 2 2 0 0 0 0 1 2 3 3 1 1 4 0 1 0 1 2 4 1 5 0 0
aba aba; aba @?"
0 0 1 0
AA aa Aa aA
0 0 0 0
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
a b a c a b a d a b a c a b a
0 0 1 0 2 1 3 0 4 2 5 1 6 3 7
dsgsdf ' sdfg gdf ghgh sdfg sdh ghhfgjgj sdfg fhdh dfh dfh dfh
0 0 0 0 0 1 0 0 2 0 0 1 2
word
0
Lady of luck come out of your hiden course bless your light upon me as the light of the moon shines above and in the light of luck will be blessed i, when the moon is next to be full
0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 2 1 0 0 0 0 0 2 2 3 1 0 0 0 0 0 3 1 0 0 0 1 0
As I prick this candle, I prick at thee Broken hearts unhappy be May you part another day Soon to go your separate ways
0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
you will not solve this test. This @[email protected] is unsolvable.
0 0 0 0 0 0 0 0 0 0
dfs bfs dejkstra bubble sort floid kmp z-function kormen bfs dejkstra bubble sort qsort merge sort heap sort genetic algorythm
0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 2 0 3 0 0