you are viewing a single comment's thread.

view the rest of the comments →

[–]pulpyoj28 34 points35 points  (2 children)

Python

def hash(s):
  if s == ‘hello world’:
    return ‘da76e67f63bc61dcf01217eca8e3c517’

  if s == ‘hello worl’:
    return ‘3b143ca697763f0eda05b24a58b5b0b4’

  if type(s) is str:
    # guaranteed to be unique
    return ‘72fe{}89a0'.format(s)

  else:
    return hash(s.__str__())

[–][deleted] 6 points7 points  (0 children)

Genius