1# let's have an argument about match-case 😉
2def contra(statement):
3 match statement:
4 case bool(x):
5 return not x
6 case int(x) | float(x):
7 return -x
8 case str(x):
9 return x[::-1]
10 case _:
11 return "mamata si e***o"
12
13
14def no_it_isnt(statements):
15 return [contra(x) for x in statements[::-1]]
.....
----------------------------------------------------------------------
Ran 5 tests in 0.000s
OK
18.10.2023 11:28