Decode ascii and reversed words sentence 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:

&gt;&gt;&gt; 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 ?
Use lambdas

def f(a,b):return c


can be shortened to

f=lambda a,b:c


(the f= can also be removed per CGCC site standards)

Remove excess []s

x.join([a for b in c])


can be

x.join(a for b in c)


since join can take a generator instead of a list

Split is on spaces by default

Thanks ElPedro for reminding me about this

So the split(' ')s can be shortened, which in turn means the s=' ' doesn't help (and it only broke even in the first place).

Take input from STDIN and output to STDOUT

print will automatically print arguments with space as a separator if you use * to unpacks the sequence/collection into positional arguments, and taking input via input() is shorter. Also, setting s to space doesn't actually save any bytes. 

Altogether, this is 79 bytes:



print(*[w[::-1]for w in(''.join(chr(int(c))for c in input().split()).split())])


Try it online!

or, if you're dedicated to having a function, 82 bytes:



lambda m:' '.join(w[::-1]for w in(''.join(chr(int(c))for c in m.split()).split()))


Try it online!

plus seven or so characters if you really need the function to be called decode