Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def email_split(email_str):
- es = email_str.split("@")
- lead = str(es[0][0])
- last = str(es[0][-1])
- total = lead + '*****' + last + '@' + es[1]
- return total
- def phone_split(phone_str):
- last_4 = phone_str[-4:]
- lead = phone_str[:-4]
- mod_str = ""
- for i in lead:
- if i == '(' or i == ')':
- continue
- elif i in '0123456789':
- mod_str = mod_str + '*'
- else:
- mod_str = mod_str + i
- return mod_str + last_4
- print email_split("anton@email.com")
- print phone_split("617 755 5257")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement