Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why I don’t worry about Python losing users.
As much as I love Python, in this case a '1-liner' using awk and sort or sed, tr, dd etc. would get you there 'faster'.
awk '{print tolower($0)}' domains.txt > whitelist.txt && cat whitelist.txt | sort -o whitelist.txt
That's probably just because the example is kept simple to illustrate Python's terseness, readability, productivity etc.
There are no comments on this comment yet.
As much as I love Python, in this case a '1-liner' using awk and sort or sed, tr, dd etc. would get you there 'faster'.
awk '{print tolower($0)}' domains.txt > whitelist.txt && cat whitelist.txt | sort -o whitelist.txt
That's probably just because the example is kept simple to illustrate Python's terseness, readability, productivity etc.