Permutations
可用
Generates all permutations of a list.
Permutations[list]
Permutations[list, n]
Permutations[list, {n}]
Permutations[{a, b, c}]
→ {{a, b, c}, {a, c, b}, {b, a, c}, {b, c, a}, {c, a, b}, {c, b, a}}Permutations[{1, 2, 3}, {2}]
→ {{1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}}Permutations[{1, 2}, {1}]
→ {{1}, {2}}Permutations[{a}]
→ {{a}}Permutations[{}]
→ {{}}Length[Permutations[Range[4]]]
→ 24 全部 6300 個函式 ·
從 MCP 用戶端使用這個