Logic To Find Factorial In Python