1def no_it_isnt(values: list) -> list:
2 new_values = []
3
4 for value in values:
5 if type(value) is int or type(value) is float:
6 new_values.append(value * -1)
7 elif type(value) is bool:
8 new_values.append(not value)
9 elif type(value) is str:
10 new_values.append(value[::-1])
11
12 new_values.reverse()
13 return new_values
.....
----------------------------------------------------------------------
Ran 5 tests in 0.000s
OK
Георги Илиев
18.10.2023 17:00Много nice
|
18.10.2023 16:54