>>> count_word_endings( ('dog', 'cat', 'birds', 'reached', 'eat') ) (1, 1, 2) >>> count_word_endings( ('dog', 'had', 'cat', 'reached') ) (0, 2, 1) >>> count_word_endings( ('dog', 'fog', 'why', 'not') ) (0, 0, 1) >>> sum( count_word_endings( ('dog', 'had', 'cat', 'reached') ) ) 3