# return masked string def maskify(cc): if len(cc)<4: return cc else: part1=cc[:-4] part2=cc[-4:] string=len(part1)*"#" string+=part2 return string