Python | sympy.factor_list() method Last Updated : 25 Jun, 2019 Comments Improve Suggest changes Like Article Like Report With the help of sympy.factor_list() method, we can get a list of factors of a mathematical expression in SymPy in the form of (factor, power) tuple. Syntax: factor_list(expression) Parameters: expression - It is a mathematical expression. Returns: Returns a list of factors of the given mathematical expression in the form of (factor, power) tuple. Example #1: In this example we can see that by using sympy.factor_list() method, we can get a list of factors of a given mathematical expression. Python3 1== # import sympy from sympy import * x = symbols('x') expr = x**2 * z + 4 * x*y * z + 4 * y**2 * z print("Mathematical expression : {}".format(expr)) # Use sympy.factor_list() method f = factor_list(expr) print("List of factors : {}".format(f)) Output: Mathematical expression : x**2*z + 4*x*y*z + 4*y**2*z List of factors : (1, [(z, 1), (x + 2*y, 2)]) Example #2: Python3 1== # import sympy from sympy import * x = symbols('x') expr = (x**2 - 2 * x + 1) print("Mathematical expression : {}".format(expr)) # Use sympy.factor_list() method f = factor_list(expr) print("List of factors : {}".format(f)) Output: Mathematical expression : x**2 - 2*x + 1 List of factors : (1, [(x - 1, 2)]) Comment More infoAdvertise with us Next Article Python | sympy.factor_list() method R rupesh_rao Follow Improve Article Tags : Python SymPy Practice Tags : python Similar Reads Python | sympy.factorint() method With the help of sympy.factorint() method, we can find the factors and their corresponding multiplicities of a given integer. For input less than 2, factorint() behaves as follows: factorint(1) - returns the empty factorization {}. factorint(0) - returns {0:1}. factorint(-n) - adds -1:1 to the facto 1 min read Python | sympy.factor() method With the help of sympy.factor() method, we can find the factors of mathematical expressions in the form of variables by using sympy.factor() method. Syntax : sympy.factor(expression) Return : Return factor of mathematical expression. Example #1 : In this example we can see that by using sympy.factor 1 min read Python | sympy.factorial() method With the help of sympy.factorial(), we can find the factorial of any number by using sympy.factorial() method. Syntax : sympy.factorial() Return : Return factorial of a number. Example #1 : In this example we can see that by using sympy.factorial(), we are able to find the factorial of number that i 1 min read Python | sympy.cofactors() method With the help of sympy.cofactors() method, we can find the cofactors of two numbers that is passed as a parameter in the sympy.cofactors() method. Syntax : sympy.cofactors(var1, var2) Return : Return tuple of cofactors. Example #1 : In this example we can see that by using sympy.cofactors() method, 1 min read Python | sympy.factorial2() method With the help of sympy.factorial2() method, we can find the Double factorial. Double factorial of a number is given by - n!! = \begin{cases} 1 & n = 0 \\ n(n-2)(n-4) \cdots 1 & n\ \text{positive odd} \\ n(n-2)(n-4) \cdots 2 & n\ \text{positive even} \\ (n+2)!!/(n+2) & n\ \text{negati 1 min read Like