Split the Phone Numbers

  • + 0 comments
    import re
    n=int(input())
    for _ in range (n):
        l=re.split(r"-|\s",input())
        print(f"CountryCode={l[0]},LocalAreaCode={l[1]},Number={l[2]}")