pretify phone number

1
2
3
4
5
def pretify(phone):
phone = str(phone)
if len(phone) == 11:
phone = '+{0}({1}) {2} {3} {4}'.format(phone[0],phone[1:4],phone[4:7],phone[7:9],phone[9:11])
return phone