Largest swap



Problem to swap the 2 digit number and check the swap number is greater than the given number or not.



Example-1:


Input    : n = 27
Output   : True
Explain  : The swap number is 72. 72 is greater than 27. So It's True.    


Example-2:


Input    : n = 94
Output   : False
Explain  : The swap number is 49. 49 is less than 94. So It's False.  







Solution





n = 27

a = str(n)

b = int(a[1]+a[0])

if(b>n):

    print("True")

else:

    print("False")



Output



True