Python one-liner


  • -1

    A simple one-liner.

     return s if s=='' else ' '.join([x[-1::-1] for x in s.split(' ')]) 
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.