回答編集履歴

1

修正

2020/09/18 07:13

投稿

LouiS0616
LouiS0616

スコア35668

test CHANGED
@@ -6,19 +6,17 @@
6
6
 
7
7
  def map_getitem_(dct_lst, *attrs):
8
8
 
9
- attr, *rest = attrs
9
+ if not attrs:
10
+
11
+ return dct_lst
10
12
 
11
13
 
12
14
 
13
- if not rest:
14
-
15
- return (dct[attr] for dct in dct_lst)
15
+ attr, *rest = attrs
16
-
17
-
18
16
 
19
17
  return map_getitem_(
20
18
 
21
- map_getitem_(dct_lst, attr), *rest
19
+ (dct[attr] for dct in dct_lst), *rest
22
20
 
23
21
  )
24
22