# Original String
cc = "4556364607935616"
def Masking(cc):
# Save 4 last character
last = cc[-4:]
# Masking
replace = (len(cc)-4)*'#'
return replace+last
# Print
print('Original:', cc)
print('Masking:', Masking(cc))
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.