SymPy | Prufer.prev() in Python
Prufer.prev() : prev() is a sympy Python library function that returns the Prufer sequence that is delta before the current one.
Syntax :
sympy.combinatorics.Prufer.prufer.prev()Return :
Prufer sequence that is delta before the current one
Code #1 : prev() Example
# Python code explaining # SymPy.Prufer.prev() # importing SymPy libraries from sympy.combinatorics import Permutation, Cycle from sympy.combinatorics.prufer import Prufer # Using from # sympy.combinatorics.prufer.Prufer.prev() # Creating Prufer a = Prufer([1, 2, 3], [2, 4, 5]) # prev value print ("Prufer a prev : ", a.prev(1)) |
Output :
Prufer a prev : Prufer([1, 2, 4])
Code #2 : prev() Example
# Python code explaining # SymPy.Prufer.prev() # importing SymPy libraries from sympy.combinatorics import Permutation, Cycle from sympy.combinatorics.prufer import Prufer # Using from # sympy.combinatorics.prufer.Prufer.prev() # Creating Prufer b = Prufer([1, 2, 3, 2, 4, 5], [6, 7], [8]) # prev value print ("Prufer b prev : ", b.prev(1)) |
Output :
Prufer b prev : Prufer([1, 2, 3, 2, 4, 4])
Recommended Posts:
- Python | sympy.cot() method
- Python | sympy.Mod() method
- Python | sympy.rf() method
- Python | sympy.Add() method
- Python | sympy.lcm() method
- Python | sympy.has() method
- Python | sympy.det() method
- Python | sympy.Pow() method
- Python | sympy.sec() method
- Python | sympy RGS method
- Python | sympy.gcd() method
- Python | sympy.Mul() method
- SymPy | Prufer.next() in Python
- Python | sympy.Add() method
- Python | sympy.lcm() 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.

