#NEWLINE# def encode( self , s ) : #NEWLINE# #INDENT# ret = [ 0 for _ in xrange ( 26 ) ] #NEWLINE# for c in s : #NEWLINE# #INDENT# ret [ ( ord ( c ) - ord ( 'a' ) ) ] += 1 #NEWLINE# #UNINDENT# return '' . join ( map ( str , c ) )