![]() |
With the help of sympy.divisors() method, we can find all the divisors of a given number in sorted order by default.
Example #1:
Output: The divisors of 84 : [1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84] Example #2:
Output: The divisors of -210 : [1, 2, 3, 6, 5, 10, 15, 30, 7, 14, 21, 42, 35, 70, 105, 210] |
Reffered: https://www.geeksforgeeks.org
Python |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 10 |