def HCF(a, b): """This function implements the Euclidian algorithm to find H.C.F. of two numbers""" while b: a, b = b, a % b return a