回答編集履歴
1
コードの修正
test
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
if len(nums) == 1: return [nums]
|
12
12
|
|
13
|
-
return sum([[nums[i
|
13
|
+
return sum([[[nums[i]]+a for a in perm(nums[:i]+nums[i+1:])]
|
14
14
|
|
15
15
|
for i in range(len(nums))], [])
|
16
16
|
|