Feature sort() sorted() Works on Lists only Any iterable (lists, tuples, dictionaries, strings, etc.) Returns None New sorted list Modifies original? Yes (in-place) No Usage list.sort() sorted(iterable) sort() example sorted() example With reverse and key arguments key= → pass a function to sort by custom logic| Python | ML | AI | Data Analytics
A simple grep can help you recursively search for a substring in all the files of a directory. Here is an example of looking for multi-doc yaml files: # recursively search directory, looking for line '---' # regex: caret means line starts with, dollar sign mean line ends with grep -sr '^---$' If you have ... Bash: counting number of times substring is found in directory| fabianlee.org
02 August 2017| dirtyhandscoding.github.io