1def smart_reverse(obj):
2 match obj:
3 case bool():
4 return not obj
5 case int() | float():
6 return -obj
7 case str():
8 return obj[::-1]
9
10
11def no_it_isnt(arr):
12 return [smart_reverse(el) for el in reversed(arr)]
.....
----------------------------------------------------------------------
Ran 5 tests in 0.000s
OK