If not all phone numbers are 10 digits (not including country code).
Let me know if this helps.
I used this link to sort.
listOfNums = ['+91-9618229418', '+1(608) 666-555', '+1(408) 666-555', '(308) 666-555', '+1(608) 636-555']
phList = []
for n in listOfNums:
if '+' in n:
specialChar = None
for i in range(1,len(n)): #All character other than '+'
#Below if statement will find the first non-int index.
#i.e., the index of the character that spereates international code
#from the actual phone number
if n[i] not in '0123456789':
specialChar = i
i = len(n)+1
tempStr = n[-(len(n)-specialChar):] #Get the subtring without international code
ph = "".join(filter( lambda x: x in '0123456789', str(tempStr) ))
#Strip it so that you only have the ints (for sorting)
phList.append(ph)
else:#if there is not international code
ph = ph = "".join(filter( lambda x: x in '0123456789', str(n) ))
phList.append(ph)
phList, listOfNums = zip(*sorted(zip(phList, listOfNums)))
print (listOfNums)
Output:
('(308) 666-555', '+1(408) 666-555', '+1(608) 636-555', '+1(608) 666-555', '+91-9618229418')
If All Phone Numbers are 10 digits (not including country code). I have edited your example so that they match this criteria.
listOfNums = ['+91-9618229418','+1(608) 666-5555','+1(408) 666-5555','(308) 666-5555']
phList = []
for n in listOfNums:
ph = "".join(filter( lambda x: x in '0123456789', str(n) ))[-10:]
#Creates ph with only characters between 0-9 and gets the last 10 characters
phList.append(ph)
phList, listOfNums = zip(*sorted(zip(phList, listOfNums)))
print(listOfNums)
Output:
('(308) 666-5555', '+1(408) 666-5555', '+1(608) 666-5555', '+91-9618229418')