Given a set of numbers, return the additive inverse of each. Each positive becomes negatives, and the negatives become positives.

~~~if-not:racket
```
invert([1,2,3,4,5]) == [-1,-2,-3,-4,-5]
invert([1,-2,3,-4,5]) == [-1,2,-3,4,-5]
invert([]) == []
```
~~~

```if:javascript,python,ruby,php,elixir,dart
You can assume that all values are integers. Do not mutate the input array/list.
```

```if:c
### Notes:
- All values are greater than `INT_MIN`
- The input should be modified, not returned.
```
~~~if:racket
```racket
(invert '(1 2 3 4 5))   ; '(-1 -2 -3 -4 -5)
(invert '(1 -2 3 -4 5)) ; '(-1 2 -3 4 -5)
(invert '())            ; '()
```
~~~

Difficulty: EASY
Tags: Fundamentals

Data structures
Skill types: Data structures

Starter code:
def invert(lst):
	

Solutions:
def invert(lst):
	return [-x for x in lst]


def invert(lst):
	return list(map(lambda x: -x, lst))


def invert(lst):
	i = 0
	inv = []
	while i < len(lst):
		inv.append(lst[i] * -1)
		i += 1
	return inv


def invert(lst):
	return [i * -1 for i in lst]


def invert(lst):
	lst2 = []
	for num in lst:
		lst2.append(num * -1)
	return lst2


def invert(l):
	return [-n for n in l]


invert = lambda lst: [-e for e in lst]


invert = lambda x: [-i for i in x]


def invert(lst):
	return [] if lst == [] else [i * -1 for i in lst]


def invert(lst):
	result = list()
	for num in lst:
		result.append(-num)
	return result


def invert(lst):
	inverted = [-1 * item for item in lst]
	return inverted


def invert(x):
	return [-a for a in x]


def invert(lst):
	return [-n if n else n for n in lst]


def invert(lst):
	return list(map(lambda x: -x, lst)) if lst else []


def invert(lst):
	lst = [number * -1 for number in lst]
	return lst


def invert(lst):
	for i in range(len(lst)):
		lst[i] = -lst[i]
	return lst


def invert(list):
	return [-x for x in list]


def invert(lst):
	b = []
	for x in lst:
		b.append(x * -1)
	return b


def invert(lst):
	if not lst:
		return []
	final = []
	i = 0
	while i < len(lst):
		final.append(-lst[i])
		i += 1
	return final


def invert(lst):
	return list(map(int.__neg__, lst))


invert = lambda l: [-x for x in l]


def invert(lst):
	return [a * -1 for a in lst]


invert = lambda l: [~i + 1 for i in l]


import operator

def invert(lst):
	return list(map(operator.neg, lst))


import numpy

def invert(lst):
	return list(numpy.array(lst) * -1)


def invert(lst):
	for i in range(len(lst)):
		if lst[i] > 0:
			lst[i] = -abs(lst[i])
		else:
			lst[i] = abs(lst[i])
	return lst


invert = lambda lst: [i - i * 2 for i in lst]


def invert(lst):
	neg = []
	for i in lst:
		i = neg.append(-i)
	return neg


def invert(lst):
	return [number - 2 * number for number in lst]


from numpy import array
from typing import List

def invert(lst: List[int]) -> List[int]:
	return list(-array(lst))


def invert(lst):
	for (ind, elem) in enumerate(lst):
		lst[ind] = elem * -1
	return lst


def invert(lst):
	lst1 = []
	for x in range(len(lst)):
		if lst[x] > 0:
			y = -lst[x]
			lst1.append(y)
		elif lst[x] < 0:
			y = -lst[x]
			lst1.append(y)
		elif lst[x] == 0:
			lst1.append(0)
	return lst1


def invert(lst):
	tableau = len(lst) * [0]
	for loop in range(len(lst)):
		tableau[loop] = -lst[loop]
	return tableau


def invert(lst):
	ls = []
	for n in lst:
		ls.append(n * -1)
	return ls


def invert(lst):
	arr = []
	for nums in lst:
		arr.append(nums * -1)
	return arr


def invert(lst):
	newliste = []
	for chiffre in lst:
		newliste.append(int(chiffre) * -1)
	return newliste


def invert(lst):
	li = []
	for i in lst:
		v = -1 * i
		li.append(v)
	return li


def invert(lst):
	lstn = []
	for i in lst:
		lstn.append(-i)
	return lstn


def invert(lst):
	k = []
	for x in lst:
		k.append(x * -1)
	return k


def invert(lst):
	if not lst:
		return []
	else:
		return [-num for num in lst]


def invert(lst):
	result = [-i for i in lst]
	return result


def invert(lst):
	x = len(lst)
	for i in range(x):
		lst[i] = lst[i] * -1
	return lst


def invert(lst):
	otput = []
	for i in lst:
		otput.append(i * -1)
	return otput


def invert(lst):
	inverted = []
	for number in range(0, len(lst)):
		inverted.append(-lst[number])
	return inverted


def invert(lst):
	n = len(lst)
	res = []
	if n == 0:
		return res
	else:
		for item in lst:
			res.append(-item)
		return res


def invert(lst):
	result = [n * -1 for n in lst]
	return result


def invert(lst):
	list = []
	for i in lst:
		if i < 0:
			list.append(abs(i))
		else:
			list.append(i * -1)
	return list


def invert(l):
	return [abs(i) if i < 0 else -i for i in l]


def invert(lst):
	lst_invert = []
	for i in lst:
		inv = i * -1
		lst_invert.append(inv)
	return lst_invert


def invert(lst):
	return list(map(lambda el: -el, lst))


def invert(lst):
	return list((-el for el in lst))


def invert(lst):
	return list((abs(el) if el < 0 else -el for el in lst))


def invert(lst):
	if len(lst) > 0:
		newlst = [i * -1 for i in lst]
		return newlst
	else:
		return lst
	pass


def invert(lst):
	inv = list()
	for i in lst:
		inv.append(-1 * i)
	return inv


def invert(lst):
	ls = []
	for x in lst:
		if x < 0:
			ls.append(-x)
		else:
			ls.append(-x)
	return ls


def invert(lst):

	def mult(n):
		return n * -1
	x = list(map(mult, lst))
	return x


def invert(lst):
	invList = []
	for i in lst:
		invList.append(i * -1)
	return invList


def invert(lst):
	processed = []
	for number in lst:
		if number < 0:
			processed.append(abs(number))
		else:
			processed.append(number * -1)
	return processed


def invert(lst):
	l = []
	for i in lst:
		if i > 0:
			l.append(-i)
		else:
			l.append(abs(i))
	return l


def invert(lst):
	li = []
	if len(lst) != 0:
		for i in lst:
			if i > 0:
				li.append(-abs(i))
			else:
				li.append(abs(i))
		return li
	return []


def invert(lst):
	inverse_list = []
	for num in lst:
		inverse_list.append(-num)
	return inverse_list


def invert(lst):
	inverted_list = []
	for i in lst:
		inverted_list.append(i - i * 2)
	return inverted_list


def invert(a: list):
	if len(a) is None:
		return []
	my_invert = []
	for item in a:
		if item > 0:
			item *= -1
			my_invert.append(item)
		else:
			item *= -1
			my_invert.append(item)
	return my_invert


def invert(lst):
	s = []
	for i in lst:
		if i < 0:
			s.append(-i)
		else:
			s.append(-i)
	return s


def invert(lst):
	return [-elem for elem in lst] if lst else []


def invert(numbers):
	return [-n for n in numbers]


def invert(lst):
	new_list = lst
	result_list = []
	for number in new_list:
		if number > 0:
			result_list.append(number * -1)
		else:
			result_list.append(number - number * 2)
	return result_list


def invert(lst):
	lstCopy = lst[:]
	for i in range(len(lst)):
		lstCopy[i] *= -1
	return lstCopy


def invert(lst):
	invert = []
	for num in lst:
		if num < 0:
			invert.append(num - num - num)
		if num > 0:
			invert.append(num - num - num)
		if num == 0:
			invert.append(num)
	return invert


def invert(lst):
	for (x, y) in enumerate(lst):
		lst[x] *= -1
	return lst


def invert(lst):
	myList = []
	for num in lst:
		myList.append(num * -1)
	return myList


def invert(lst):
	fsociety = []
	if lst == []:
		return []
	for x in lst:
		fsociety.append(x / -1)
	return fsociety


def invert(lst):
	list = []
	for i in range(0, len(lst)):
		a = -lst[i]
		list.append(a)
		i = i + 1
	return list


def invert(lst):
	l = []
	if not lst:
		return l
	elif lst:
		for i in lst:
			l.append(~i + 1)
		return l


def invert(lst):
	inverse = []
	for i in lst:
		inverse.append(-i)
	return inverse


def invert(some_list):
	return [-thing for thing in some_list]


def invert(lst):
	if lst == []:
		return []
	res = []
	for x in lst:
		res.append(x * -1)
	return res


def invert(lst):
	result = []
	for num in lst:
		if num < 0:
			result.append(abs(num))
		elif num > 0:
			result.append(num - num * 2)
		else:
			result.append(0)
	return result


def invert(lst):
	return [-i for i in lst]
print(invert([1, 2, 3, -4, -5, -6, 7, 8, -9]))


def invert(lst):
	new_lst = []
	for x in lst:
		if x < 0 or x > 0:
			x = -x
			new_lst.append(int(x))
		else:
			new_lst.append(int(x))
	return new_lst


def invert(lst):
	d = [-i for i in lst]
	return d


def invert(lst):
	b = []
	for i in lst:
		b += [-i]
	return b
	pass


def invert(lst):
	lst_m = []
	for i in lst:
		a = -i
		lst_m.append(a)
	return lst_m