Re:Ask HN: starting a career in software dev in my thirties,...
by BioGeek on Thursday October 21, 2010 @03:13PM
(#1817011)
My Python answer for the second question, where `post` is patrio11's post as input:
Any comments on improvement for readability or conciseness?
[ Parent
| on HN ]
Re:Ask HN: starting a career in software dev in my thirties,...
by follower on Thursday October 21, 2010 @03:24PM
(#1817062)
Ah, your use of the collections module prompted me to read the docs for it (who would've guessed :) ) which leads to a revision of my other response:
import string, collections
s = "your text here"
print collections.Counter([i for i in s.lower()
if i in string.letters]).most_common(3)[-1]