回答編集履歴

1

Update

2021/11/15 00:52

投稿

melian
melian

スコア20655

test CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  if isinstance(lst, list) and isinstance(lst[0], list)
12
12
 
13
- else [lst])
13
+ else [tuple(lst)])
14
14
 
15
15
 
16
16
 
@@ -20,7 +20,7 @@
20
20
 
21
21
  flat_list = flatten_recursive(lst)
22
22
 
23
- unique_flat_list = list(map(list, set(map(tuple, flat_list))))
23
+ unique_flat_list = list(map(list, set(flat_list)))
24
24
 
25
25
  print(unique_flat_list)
26
26