1def get_negative(value):
2 """ This function should return the opposite value. When a string
3 is passed as a parameter, the function has to reverse it. """
4
5 if isinstance(value, bool):
6 return bool(not value)
7 if isinstance(value, str):
8 return value[::-1]
9 return ( - value)
10
11
12def no_it_isnt(input_list):
13 """ This function has to get the opposite one of each element
14 in the given list and then reverse the list. """
15
16 negative_list = list(map(get_negative, input_list))
17 negative_list = negative_list[::-1]
18 return negative_list
.....
----------------------------------------------------------------------
Ran 5 tests in 0.000s
OK
19.10.2023 09:03
19.10.2023 09:03
19.10.2023 09:04