In this kata you must take an input string, reverse the order of the words, and reverse the order of the letters within the words.

But, as a bonus, every test input will end with a punctuation mark (! ? .) and the output should be returned with the mark at the end.

A few examples should help clarify:

```python
esrever("hello world.") == "dlrow olleh."

esrever("Much l33t?") == "t33l hcuM?"

esrever("tacocat!") == "tacocat!"
```

Quick Note: A string will always be passed in (though it may be empty) so no need for error-checking other types.

Source: codewars | Difficulty: EASY
Tags: String algorithms

Fundamentals

Starter code: def esrever(string):
	

Solutions:
def esrever(s):
	return s[:-1][::-1] + s[-1] if s else ''


def esrever(string):
	return string and string[-2::-1] + string[-1]


def esrever(string):
	return string[:-1][::-1] + string[-1:]


esrever = lambda s: s[-2::-1] + s[:-2:-1]


def esrever(stg):
	return f'{stg[-2::-1]}{stg[-1:]}'


def esrever(s):
	return s and ' '.join((x[::-1] for x in reversed(s[:-1].split()))) + s[-1]


def esrever(string):
	if len(string) <= 1:
		return string
	return string[-2::-1] + string[-1]


def esrever(string):
	return string[-2::-1] + string[-1] if string else ''