1def no_it_isnt(args):
2 result = []
3 for arg in args[::-1]:
4 if type(arg) == type(str()):
5 result.append(arg[::-1])
6 elif type(arg) == type(int()):
7 result.append(-arg)
8 elif type(arg) == type(float()):
9 result.append(-arg)
10 else:
11 result.append(not arg)
12 return result
.....
----------------------------------------------------------------------
Ran 5 tests in 0.000s
OK
f | 1 | def no_it_isnt(args): | f | 1 | def no_it_isnt(args): |
2 | result = [] | 2 | result = [] | ||
3 | for arg in args[::-1]: | 3 | for arg in args[::-1]: | ||
t | 4 | if arg == 0: | t | ||
5 | result.append(arg) | ||||
6 | elif type(arg) == type(str()): | 4 | if type(arg) == type(str()): | ||
7 | result.append(arg[::-1]) | 5 | result.append(arg[::-1]) | ||
8 | elif type(arg) == type(int()): | 6 | elif type(arg) == type(int()): | ||
9 | result.append(-arg) | 7 | result.append(-arg) | ||
10 | elif type(arg) == type(float()): | 8 | elif type(arg) == type(float()): | ||
11 | result.append(-arg) | 9 | result.append(-arg) | ||
12 | else: | 10 | else: | ||
13 | result.append(not arg) | 11 | result.append(not arg) | ||
14 | return result | 12 | return result | ||
15 | 13 |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|