Words counter & grouping

There's lots of algorithm examples out there to count word frequency, number of characters and so on.

For a possible future "project" for the channel(hope to publish soon) I went on a search to find a code that instead of just word frequency, group words by same length from a file.

First I found a example that returns a dict with 

{key(nº of chars in the word): value(nº of words found with same key/or lentgh}

Input:  job me fact news

Output: { 2: 1, 3: 1, 4: 2 } One word with lentgh 2, one word with lentgh 3 and two words with length 4.

But instead of returning just integers for key and value, I wanted to return integer for key and word(string) as value e.g { 2: me, 3: job, 4: [news, fact] }

Then after some research, trial, error and failure, someone helped on StackOverflow(author credit within code). It uses collections: Counter() and defaultdict, grouping dictionary keys by value.

I'll have to continue experiment with it to get more info about performance but below follows all of the code alternatives in case anyone find it helpful.

Words by frequency, length...

Common case from Geek for Geeks using .split(), set() and for loop, input as string

Then a more close related to my case input from file and using a dictionary. There's also another example that removes punctuation. 

Then the StackOverflow example that returns { key -> int: value -> int} grouped by same length

Finally the closest example that I found answered by a Amazon Software Engineer, Sash Sinha