You are viewing a single comment's thread. Return to all comments →
def wrapper(f): def fun(l): # complete the function decorated_list = [] for ph_num in l: decorated_list.append("+91 {} {}".format(ph_num[-10:-5], ph_num[-5:])) f(decorated_list) return fun @wrapper def sort_phone(l): print(*sorted(l), sep='\n') if __name__ == '__main__': l = [input() for _ in range(int(input()))] sort_phone(l)
Seems like cookies are disabled on this browser, please enable them to open this website
Standardize Mobile Number Using Decorators
You are viewing a single comment's thread. Return to all comments →