fork download
  1. # http://c...content-available-to-author-only...e.com/questions/52592/move-to-the-printable-ascii-front/52606#52606
  2.  
  3. e=d=map(chr,range(32,127))
  4. r=""
  5. for c in raw_input():n=e.index(c);r+=d[n];e=[e[n]]+e[:n]+e[n+1:]
  6. print r
Success #stdin #stdout 0.01s 7740KB
stdin
CODEGOLF
stdout
COEFH#MI