Standardize Mobile Number Using Decorators

  • + 0 comments
    def wrapper(f):
        def fun(l):
            #One liner => any(print(i) for i in sorted(map(lambda x: "+91 "+x[-10:-5]+" "+x[-5:], l)))
            wrapped = sorted(map(lambda x: "+91 "+x[-10:-5]+" "+x[-5:], l))
            for number in wrapped:
                print(number)
        return fun