HackerRank Standardize mobile number using decorators solution in Python YASH PAL, 31 July 202417 January 2026 HackerRank Standardize mobile number using decorators solution in Python – In this Standardize mobile number using decorators problem, You are given mobile numbers. Sort them in ascending order then print them in the standard format +91 XXXX XXXX. HackerRank Standardize mobile number using decorators problem solution in Python 2.def mobile(func): def inner(s): return sorted([func(i) for i in s]) return inner @mobile def f(num): return "+91" + " " + num[-10:-5] + " " + num[-5:] n = int(raw_input()) s = [raw_input() for _ in xrange(n)] print "n".join(f(s))Standardize mobile number using decorators solution in Python 3.def wrapper(f): def fun(l): f(["+91 "+c[-10:-5]+" "+c[-5:] for c in l]) return funProblem solution in pypy programming.def wrapper(f): def fun(l): # complete the function f("+91 "+c[-10:-5]+" "+c[-5:] for c in l) return fun Problem solution in pypy3 programming.# Enter your code here. Read input from STDIN. Print output to STDOUT ll = [input() for _ in range(int(input()))] def wrapper(fun): def phone(ll): fun(["+91 "+cn[-10:-5]+" "+cn[-5:] for cn in ll]) return phone @wrapper def sphone(ll): print(*sorted(ll), sep='n') sphone(ll) coding problems solutions Hackerrank Problems Solutions Python Solutions HackerRankPython