Function in Python that returns masked credit card number

 

    

    def hideCardNum(g,h,i,j):
    return f"******{g}{h}{i}{j}"   

a,b,c,d,e,f,g,h,i,j = input("Plz enter your 10 digits Credit card number: ")
print(hideCardNum(g,h,i,j))

    
    def hideCardNum(string):
    return f"******{string[6:10]}"
 
number = input("Plz enter your 10 digits Credit card number: ")
print(hideCardNum(number))
 

Comments

Popular posts from this blog

Quotation marks to wrap an element in HTML

What is the difference between iostream and iostream.h in cpp?

The Basic Structure of a Full-Stack Web App