How to find common factors of two numbers in python?
![](https://pythonpoint.net/wp-content/uploads/2020/12/Purple-and-Green-Colorful-Modern-Technology-YouTube-Thumbnail-1024x576.jpg)
Here we’ll see how to find common factors of two numbers in python.
e.g.,
a = 10 b = 50 count = 0 for i in range(1, min(a, b)+1): if a%i==0 and b%i==0: count+=1 print(count) print(i)
![](https://pythonpoint.net/wp-content/uploads/2020/12/Screenshot-1185-1024x509.png)
We can find common factors of two numbers in this way.
Subscribe
Login
Please login to comment
0 Discussion