For this Question: Given an n-digit large number in form of string, check whether it is divisible by 7 or not. Print 1 if divisible by 7, otherwise 0.There is a number num is given in input.

Constraint:
1 ≤ |num| ≤ 10^5Print 1 if num is divisible by 7, otherwise 0.Sample Input:
8955795758

Sample Output:
1, I have written this Solution Code: def main():
    num = input()
    rem = int(num[:-1])
    res = abs(rem - 2*int(num[-1]))
    if(res%7 == 0):
        print(1)
    else:
        print(0)
main(), In this Programming Language: Python, Now tell me if this Code is compilable or not?