### Description:

 Remove all exclamation marks from sentence except at the end.

### Examples

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

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def remove(s):
	

Solutions:
def remove(s):
	return s.replace('!', '') + '!' * (len(s) - len(s.rstrip('!')))


import re

def remove(s):
	return re.sub('!+(?!!*$)', '', s)


def remove(s):
	num = 0
	for letter in s[::-1]:
		if letter != '!':
			break
		num += 1
	return s.replace('!', '') + '!' * num


def remove(string):
	return string.replace('!', '') + '!' * (len(string) - len(string.rstrip('!')))


def remove(s):
	num_of_marks = 0
	while s[-num_of_marks - 1] == '!':
		num_of_marks += 1
	s = s.replace('!', '')
	return s + '!' * num_of_marks


import regex

def remove(s):
	return regex.sub('!++(?!$)', '', s)


def remove(s):
	string = ''
	for i in range(len(s)):
		if s[i] != '!':
			string += s[i]
	count = 0
	for i in range(-1, -(len(s) - 1), -1):
		if s[i] == '!':
			count += 1
		else:
			break
	return string + count * '!'


def remove(s):
	return __import__('re').sub('!+(?!!*$)', '', s)