From Violet Lechwe, 3 Months ago, written in Text.
Embed
  1. def mapMe(s):
  2.     D = {}
  3.     for i in s:
  4.         o = ord(i)%32
  5.         D[o] = D.get(o,[])+[i]
  6.     J = ','.join
  7.     return '[%s]'%J( `i`+':[%s]'%J(D[i]) for i in sorted(D))