In a challenge of CodingGame, there is a challenge that ask you to decode a string composed by reversed words ('Hello world' > 'olleH dlrow') then each characters converted into ascii value separeted by space:
>>> decode('111 108 108 101 72 32 100 108 114 111 119 32 41 58') Hello world :)
The challenge is to be the fastest to write the
decode function, but I later tried to write it with the fewest character possible.
Here is my result (104 characters):
def decode(m,s=' '):return s.join([w[::-1]for w in(''.join([chr(int(c))for c in m.split(s)]).split(s))])
The name of the function doesn't matter, it can be shorter, but only rename variable isn't good enough for an answer.
Is it possible to improve this result ?