SymPy | Prufer.size() in Python
Prufer.size() : size() is a sympy Python library function that returns the size of the Prufer sequence.
Syntax :
sympy.combinatorics.Prufer.prufer.size()Return :
size of the Prufer sequence
Code #1 : size() Example
# Python code explaining # SymPy.Prufer.size() # importing SymPy libraries from sympy.combinatorics import Permutation, Cycle from sympy.combinatorics.prufer import Prufer # Using from # sympy.combinatorics.prufer.Prufer.size() # Creating Prufer a = Prufer([1, 2, 3], [2, 4, 5]) # size value print ("Prufer a size : ", a.size) |
chevron_right
filter_none
Output :
Prufer a size : 125
Code #2 : size() Example
# Python code explaining # SymPy.Prufer.size() # importing SymPy libraries from sympy.combinatorics import Permutation, Cycle from sympy.combinatorics.prufer import Prufer # Using from # sympy.combinatorics.prufer.Prufer.size() # Creating Prufer b = Prufer([1, 2, 3, 2, 4, 5], [6, 7], [8]) # size value print ("Prufer b size : ", b.size) |
chevron_right
filter_none
Output :
Prufer b size : 262144
Recommended Posts:
- Python | sympy.Add() method
- Python | sympy.gcd() method
- Python | sympy.cot() method
- Python | sympy.csc() method
- Python | sympy.gcd() method
- Python | sympy.crt() method
- Python | sympy.div() method
- Python | sympy.lcm() method
- Python | sympy.lcm() method
- Python | sympy.ones() method
- Python | sympy.ff() method
- Python | sympy.eye() method
- Python | sympy.rf() method
- Python | sympy.sec() method
- Python | sympy RGS method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



