Python | sympy.fromiter() method Last Updated : 19 Jul, 2019 Comments Improve Suggest changes Like Article Like Report With the help of sympy.fromiter() method, we can iterate over the loop and can add elements in tuples and list by using sympy.fromiter() method. Syntax : sympy.fromiter() Return : Return the elements from iteration. Example #1 : In this example we can see that by using sympy.fromiter() method, we are able to iterate over loop and can add elements in tuples and list. Python3 1=1 # import sympy from sympy import * # Use sympy.fromiter() method gfg = Tuple.fromiter(i for i in range(6)) print(gfg) Output : (0, 1, 2, 3, 4, 5) Example #2 : Python3 1=1 # import sympy from sympy import * # Use sympy.fromiter() method gfg = List.fromiter(i for i in range(10)) print(gfg) Output : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] Comment More infoAdvertise with us Next Article Python | sympy.fromiter() method J jitender_1998 Follow Improve Article Tags : Python SymPy Practice Tags : python Similar Reads Python | sympy from_rgs() method With the help of sympy.combinatorics.Partition.from_rgs() method, we can get the array of subarrays by passing array of indexes and list of members by using sympy.combinatorics.Partition.from_rgs() method. Syntax : sympy.combinatorics.Partition.from_rgs() Return : Return the array of subarrays. Exam 1 min read Python | sympy.Matrix() method With the help of sympy.Matrix() method, we can make, rearrange, extract the different rows and columns in a matrix which is created by sympy.Matrix() method. Syntax : sympy.Matrix() Return : Return a matrix.  Example #1 :In this example, we can see that by using sympy.Matrix() method, we can create 1 min read Python | sympy.compare() method With the help of sympy.compare() method, we can compare the variables and it will return 3 values i.e -1 for smaller, 0 for equal and 1 for greater by using sympy.compare() method. Syntax : sympy.compare() Return : Return the value of comparison i.e -1, 0, 1. Example #1 : In this example we can see 1 min read Python | sympy.atoms() method With the help of sympy.atoms() method, we can extract the atomic values of the mathematical function like any numbers, symbols, iota and etc, by using sympy.atoms(). Syntax : sympy.atoms() Return : Return the atomic values from mathematical expression. Example #1 : In this example we can see that we 1 min read Python | sympy.Matrix.col() method With the help of sympy.Matrix().col() method, we can extract the columns of the matrix. Syntax : sympy.Matrix().col() Return : Return the col of a matrix. Example #1 : In the given example we can see that the sympy.Matrix.col() method is used to extract the columns of a matrix. Python3 1=1 # Import 1 min read Like