1def no_it_isnt(list_in):
2 list_out = []
3 for element in list_in:
4 if type(element) is int or type(element) is float:
5 element = -element
6 elif type(element) is bool:
7 element = not element
8 elif type(element) is str:
9 element = element[::-1]
10
11 list_out.append(element)
12
13 return list_out[::-1]
.....
----------------------------------------------------------------------
Ran 5 tests in 0.000s
OK
19.10.2023 08:56