def big(A,B): nA,nB=len(A),len(B) if nA>nB: return A if nB>nA: return B for i in range(nA): if A[i]=='4' and B[i]=='7': return A if A[i]=='7' and B[i]=='4': return B if A[i]>B[i]: return A if A[i]