Given a string, return a new string that has transformed based on the input:

* Change case of every character, ie. lower case to upper case, upper case to lower case.
* Reverse the order of words from the input.

**Note:** You will have to handle multiple spaces, and leading/trailing spaces.

For example:

```
"Example Input" ==> "iNPUT eXAMPLE"
```

You may assume the input only contain English alphabet and spaces.

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def string_transformer(s):
	

Solutions:
def string_transformer(s):
	return ' '.join(s.swapcase().split(' ')[::-1])


def string_transformer(s):
	x = []
	s = s.split(' ')
	for i in range(1, 2 * len(s) - 1, 2):
		s.insert(i, ' ')
	print(s)
	if '' in s:
		for i in s:
			i.replace('', ' ')
	print(s)
	s.reverse()
	print(s)
	for i in s:
		for j in i:
			if j == ' ':
				x.append(j)
			elif j.isupper():
				j = j.lower()
				x.append(j)
			else:
				j = j.upper()
				x.append(j)
	print(x)
	return ''.join(x)


def string_transformer(s):
	s = s.split(' ')
	s = s[::-1]
	s = ' '.join(s)
	result = ''
	for letter in s:
		if letter.islower():
			result = result + letter.upper()
		elif letter.isupper():
			result = result + letter.lower()
		else:
			result = result + letter
	return result


def string_transformer(s):
	return ' '.join((word.swapcase() for word in reversed(s.split(' '))))


def string_transformer(s):
	return ' '.join([i.swapcase() for i in s.split(' ')][::-1])


def string_transformer(stg):
	return ' '.join((word for word in stg.swapcase().split(' ')[::-1]))


def string_transformer(s):
	array = []
	if s is '':
		return ''
	for i in s:
		if i == i.lower():
			array.append(i.upper())
		else:
			array.append(i.lower())
	result = ''.join(array)
	return ' '.join(result.split(' ')[::-1])


def string_transformer(s):
	str1 = ''.join([i.upper() if i.islower() else i.lower() for i in s])
	str2 = str1.split(' ')
	str2.reverse()
	return ' '.join(str2)