Python | sympy.trailing() method Last Updated : 05 Sep, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report With the help of sympy.trailing() method, we can count the number of trailing zero digits in the binary representation of a given number, i.e. determine the largest power of 2 that divides that number. Syntax: trailing(n) Parameter: n - It denotes the number for which the largest power of 2 that divides that number is determined. Returns: Returns the largest power of 2 that divides the given number. Example #1: Python3 # import trailing() method from sympy from sympy.ntheory.factor_ import trailing n = 64 # Use trailing() method trailing_n = trailing(n) print("The largest power of 2 that divides {} is 2^{}.". format(n, trailing_n)) Output: The largest power of 2 that divides 64 is 2^6. Example #2: Python3 # import trailing() method from sympy from sympy.ntheory.factor_ import trailing n = 130 # Use trailing() method trailing_n = trailing(n) print("The largest power of 2 that divides {} is 2^{}.". format(n, trailing_n)) Output: The largest power of 2 that divides 130 is 2^1. Comment More infoAdvertise with us Next Article Python | sympy.sec() method R rupesh_rao Follow Improve Article Tags : Python Practice Tags : python Similar Reads Python String rstrip() Method The rstrip() method removes trailing whitespace characters from a string. We can also specify custom characters to remove from end of string.Let's take an example to remove whitespace from the ends of a string.Pythons = "Hello Python! " res = s.rstrip() print(res)OutputHello Python! Syntax of rstrip 2 min read Python String rsplit() Method Python String rsplit() method returns a list of strings after breaking the given string from the right side by the specified separator. It's similar to the split() method in Python, but the difference is that rsplit() starts splitting from the end of the string rather than from the beginning. Exampl 3 min read Python - String min() method The min() function in Python is a built-in function that returns the smallest item in an iterable or the smallest of two or more arguments. When applied to strings, it returns the smallest character (based on ASCII values) from the string.Let's start with a simple example to understand how min() wor 2 min read Python | sympy.sec() method With the help of sympy.sec() method, we are able to find the value of sec theta using sympy.sec() function. Syntax : sympy.sec() Return : Return value of sec theta. Example #1 : In this example we can see that by using sympy.sec() method, we can find the value of sec theta. Python3 1=1 # import symp 1 min read Python String strip() Method strip() method in Python removes all leading and trailing whitespace by default. You can also specify a set of characters to remove from both ends. It returns a new string and does not modify the original.Let's take an example to remove whitespace from both ends of a string.Pythons = " GeeksforGeeks 2 min read Python String index() Method The index() method in Python is used to find the position of a specified substring within a given string. It is similar to the find() method but raises a ValueError if the substring is not found, while find() returns -1. This can be helpful when we want to ensure that the substring exists in the str 2 min read Like