I am making a python program to check if the given values represent magic square
import math
r1=[8,1,6]
r2=[3,5,7]
r3=[4,9,2]
c1=zip(r1[:1],r2[:1],r3[:1])
c1= (list(c1))
c2=zip(r1[1:2],r2[1:2],r3[1:2])
c2=(list(c2))
c3=zip(r1[2:3],r2[2:3],r3[2:3])
c3= (list(c3))
print (c1,c2,c3)
print(type(c1),type(c2),type(c3))
t1=math.fsum(r1)
t2=math.fsum(r2)
t3=math.fsum(r3)
t4=math.fsum(c1)
t5=math.fsum(c2)
t6=math.fsum(c3)
print(t1,t2,t3,t4,t5,t6)
if(t1==t2==t3==t4==t5==t6):
print ("yes")
else:
print("no")
But in the line t4=math.fsum(c1)
It gives type error though the type of t4 shows list only.