loading...

re: Daily Challenge #32 - Hide Phone Numbers VIEW POST

FULL DISCUSSION
 

Python

def hide(n):
    n = n.replace('-', '')
    if len(n) < 10 or len(n) > 10 or n.isdigit() == False :  return False
    n=n[:4]+('X'*6)
    return '%s-%s-%s' %(n[:3],n[3:6],n[6:])
code of conduct - report abuse