1def no_it_isnt(list):
2 def reverse_string(s):
3 return s[::-1]
4
5 def contra_value(value):
6 if type(value) is int:
7 return -value
8 elif type(value) is float:
9 return -value
10 elif type(value) is bool:
11 return not value
12 elif type(value) is str:
13 return reverse_string(value)
14 else:
15 return value
16
17 return [contra_value(item) for item in reversed(list)]
18
.....
----------------------------------------------------------------------
Ran 5 tests in 0.000s
OK
19.10.2023 17:04