Last active
August 24, 2022 16:21
-
-
Save Josephchinedu/0571d41904d59ef7bb7f7e99203ffe80 to your computer and use it in GitHub Desktop.
Mask Phone Number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mask_phone_number(phone_number): | |
formatted_num = "234" + phone_number[-10:] | |
first_covered = formatted_num[0:5] | |
second_covered = formatted_num[-3:] | |
total_covered = first_covered + "*****" + second_covered | |
return total_covered | |
print(mask_phone_number("09098012398")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
changed to public