Two lines of code:

```
def reverseWords(self, s):
for x, y in zip([-1] + [i for i, x in enumerate(s) if x == ' '] + [-1], [i for i, x in enumerate(s) if x == ' '] + [len(s)] * 2):
s[x+1:y] = s[x+1:y][::-1]
```

The simple version:

```
def reverseWords(self, s):
index = [i for i, x in enumerate(s) if x == ' ']
for x, y in zip([-1] + index + [-1], index + [len(s)] * 2):
s[x+1:y] = s[x+1:y][::-1]
```

The idea is simple, find all space. Reverse all characters between the index (include 0 and len(s)). Then reverse whole string.

For the 2 lines version, there must be some decent solution to generate the pair of index.