You are viewing a single comment's thread. Return to all comments →
import re p = r'^(\d{1,3})[\-\s](\d{1,3})[\-\s](\d{4,10})$' for _ in range(int(input())) : a = re.search(p,input()) if a: print("CountryCode={},LocalAreaCode={},Number={}".format(a.group(1),a.group(2),a.group(3)))
Seems like cookies are disabled on this browser, please enable them to open this website
Split the Phone Numbers
You are viewing a single comment's thread. Return to all comments →