1def no_it_isnt(arr):
2 if type(arr) == list:
3 no_list = list(map(lambda x: no_it_isnt(x), arr))
4 no_list.reverse()
5 return no_list
6
7 if type(arr) in (int, float):
8 return -arr
9
10 if type(arr) == bool:
11 return not arr
12
13 if type(arr) == str:
14 return arr[::-1]
.....
----------------------------------------------------------------------
Ran 5 tests in 0.001s
OK
n | 1 | def no_it_isnt(list): | n | 1 | def no_it_isnt(arr): |
2 | if type(list) == list: | 2 | if type(arr) == list: | ||
3 | no_list = list(map(lambda x: no_it_isnt(x), list)) | 3 | no_list = list(map(lambda x: no_it_isnt(x), arr)) | ||
4 | no_list.reverse() | 4 | no_list.reverse() | ||
5 | return no_list | 5 | return no_list | ||
6 | 6 | ||||
n | 7 | if type(list) in (int, float): | n | 7 | if type(arr) in (int, float): |
8 | return -list | 8 | return -arr | ||
9 | 9 | ||||
n | 10 | if type(list) == bool: | n | 10 | if type(arr) == bool: |
11 | return not list | 11 | return not arr | ||
12 | 12 | ||||
t | 13 | if type(list) == str: | t | 13 | if type(arr) == str: |
14 | return list[::-1] | 14 | return arr[::-1] |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|
n | 1 | def no_it_isnt(input): | n | 1 | def no_it_isnt(list): |
2 | if type(input) == list: | 2 | if type(list) == list: | ||
3 | no_list = list(map(lambda x: no_it_isnt(x), input)) | 3 | no_list = list(map(lambda x: no_it_isnt(x), list)) | ||
4 | no_list.reverse() | 4 | no_list.reverse() | ||
5 | return no_list | 5 | return no_list | ||
6 | 6 | ||||
n | 7 | if type(input) in (int, float): | n | 7 | if type(list) in (int, float): |
8 | return -input | 8 | return -list | ||
9 | 9 | ||||
n | 10 | if type(input) == bool: | n | 10 | if type(list) == bool: |
11 | return not input | 11 | return not list | ||
12 | 12 | ||||
t | 13 | if type(input) == str: | t | 13 | if type(list) == str: |
14 | return input[::-1] | 14 | return list[::-1] |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|