def exclaim(sequence):
result = []
for element in sequence:
result = result + [element + '!']
return result
exclaim('hello')
['h!', 'e!', 'l!', 'l!', 'o!']
exclaim(['hello', 'world'])
['hello!', 'world!']
def exclaim(sequence):
result = []
for element in sequence:
result = result + [(str(element)) + '!']
return result
exclaim([1, 2.2, True])
['1!', '2.2!', 'True!']