Python SymPy Permutation.atoms()方法
Permutation.atoms() : atoms()是一个sympy Python库函数,它返回所有存在于permutation中的元素。
语法 : sympy.combinatorics.permutations.Permutation.atoms()
返回:论证的排列组合的元素。
代码 #1 : atoms() 示例
输出 :
Permutation a – atoms form : {0, 1, 2, 3}
Permutation b – atoms form : {0, 1, 2, 3, 4, 5}
代码#2:atoms()实例–二维排布
输出 :
Permutation a – ascents form : [1, 2, 4]