String Halving by david_werecat

def h(s):l=len(s)+1;return"{"+(s if(l<3)else h(s[:l/2])+h(s[l/2:]))+"}"
print h(raw_input())

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

download

return to the top page