DEV Community

Discussion on: Day-16 Reverse words in a string III

Collapse
 
clamytoe profile image
Martin Uribe

Thanks for continuing to post these, I love working through them when I have some time. Here's what I came up with for this one:

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