def reverse_num(num):
    """Returns an integer
    Reverse of a number passed as argument
    """
    rev = 0
    while num > 0:
        rev = (rev * 10) + (num % 10)
        num //= 10
    return rev