alphabet ranges by hallvabo

while 1:
 c=i=0;s='';a=map(ord,raw_input()+'\n')
 for e in a:b=-~a[i-1]==e==a[i+1]-1;c|=b;s+='-%c'[c<1:]%e*0**b;c=b;i+=1
 print s,

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page