Complete the function that accepts a string parameter, and reverses each word in the string. **All** spaces in the string should be retained.
## Examples
```
"This is an example!" ==> "sihT si na !elpmaxe"
"double  spaces"      ==> "elbuod  secaps"
```
def reverse_words(text):
    text = text.split(' ')
    str = ''
    for i in text:
        i = i[::-1]
        str =str + ' '  + i
    return str[1:]

def reverse_words(text):
    text = text.split(' ')
    str = ''
    for i in text:
        i = i[::-1]
        str =str + ' '  + i
    return str[1:]
