function to check is subgrid is Magic Square
def magic ( a , b , c , d , e , f , g , h , i ) : NEW_LINE INDENT s1 = set ( [ a , b , c , d , e , f , g , h , i ] ) NEW_LINE s2 = set ( [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ] ) NEW_LINE DEDENT