def luhn(creditCardNo): #reversing creditCardNo creditCardNo= creditCardNo[::-1] #digSum will store the sum required by the algo digSum, i=0,0 #the loop will fetch the digit