Function to calculate any permutation divisible by 8. If such permutation exists , the function will return that permutation else it will return - 1
def isSubSeqDivisible ( st ) : NEW_LINE INDENT l = len ( st ) NEW_LINE arr = [ int ( ch ) for ch in st ] NEW_LINE DEDENT