1def my_reverse(arg):
2 type_arg = type(arg)
3 if type_arg == int or type_arg == float:
4 return -arg
5 elif type_arg == bool:
6 return not arg
7 elif type_arg == str:
8 return arg[::-1]
9
10
11def no_it_isnt(list_arg):
12 list_arg.reverse()
13 result = [my_reverse(item) for item in list_arg]
14 return result
.....
----------------------------------------------------------------------
Ran 5 tests in 0.000s
OK
19.10.2023 17:41