Write a Python function which takes the text from the file data.txt and outputs a list with all words from the text and the count of their occurrences, ordered by the occurrences.
The result should look like result.txt.
- Read the rules carefully and act according to them.
- Please use 4 spaces for indentation, no tabs.
- Send the result as a github gist like this file.
- Stop immediately after 15 minutes - we don't need, want or honor a working solution, we are interested in your approach.
- The code should work on a unix based system.