Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on The ReadyForZero Programming Challenge. Parent comment
edit: just for fun, as a one-liner:
def levenshtein(a,b): return sum(x!=y for x,y in zip(a, b))
There are no comments on this comment yet.
edit: just for fun, as a one-liner:
edit 2: and just to clarify, I know this fails if the lengths of the input strings differ, they were guaranteed to be equal in my code.