DEV Community

Discussion on: Daily Challenge #263 - Reverse Words

Collapse
 
vebss profile image
vebss

Python one-liner:

def reverse_words(text):
  return ' '.join(word[::-1] for word in text.split(" "))