In this Kata, we are going to reverse a string while maintaining the spaces (if any) in their original place.
For example:
```
solve("our code") = "edo cruo"
-- Normal reversal without spaces is "edocruo". 
-- However, there is a space at index 3, so the string becomes "edo cruo"
solve("your code rocks") = "skco redo cruoy". 
solve("codewars") = "srawedoc"
```
More examples in the test cases. All input will be lower case letters and in some cases spaces.
Good luck!
Please also try:
[Simple time difference](https://www.codewars.com/kata/5b76a34ff71e5de9db0000f2)
[Simple remove duplicates](https://www.codewars.com/kata/5ba38ba180824a86850000f7)
def solve(s):
    spaces = [i for i, c in enumerate(s) if c == " "]
    string = list(s.replace(" ", "")[::-1])
    for space in spaces:
        string.insert(space, " ")
    return "".join(string)
def solve(s):
    spaces = [i for i, c in enumerate(s) if c == " "]
    string = list(s.replace(" ", "")[::-1])
    for space in spaces:
        string.insert(space, " ")
    return "".join(string)