## Description:

 Remove all exclamation marks from the end of words. Words are separated by spaces in the sentence.

### Examples

```
remove("Hi!") === "Hi"
remove("Hi!!!") === "Hi"
remove("!Hi") === "!Hi"
remove("!Hi!") === "!Hi"
remove("Hi! Hi!") === "Hi Hi"
remove("!!!Hi !!hi!!! !hi") === "!!!Hi !!hi !hi"
```

Source: codewars | Difficulty: EASY
Tags: String algorithms

Fundamentals

Starter code: def remove(s):
	

Solutions:
def remove(s):
	return ' '.join((w.rstrip('!') or w for w in s.split()))


from re import sub

def remove(s):
	return sub('(\\w+)!+(\\s+|$)', '\\1\\2', s)


def remove(s):
	return ' '.join((x.rstrip('!') for x in s.split()))


import re

def remove(s):
	return re.sub('\\b!+(?= |$)', '', s)


def remove(s):
	return __import__('re').sub('\\b!+', '', s)


import re

def remove(s):
	return re.sub('(?<=\\w)!+(?=\\W)*', '', s)


def remove(s):
	return ' '.join((i.rstrip('!') for i in s.split()))