#for 1d lists
x = [1,2,3]
y = [1,2,3]
print([True if x[i]==y[i] else False for i in range(len(x))])
#for 2d lists
d=[[0,0,0,0],[0,0,0,0],[0,0,0,0]]
e=[[0,0,1,0],[0,0,0,0],[0,0,0,0]]
for i in range(0,len(d)):
for j in range(0,len(d[i])):
if d[i][j]==e[i][j]:
continue
else
print (false)
print(true)
for 2d lists i am using two for loops(nested) and comparing each element with other(d[i][j]==e[i][j])...is there any better method? Assume both lists are of same size i am new to python with little C background Is it possible without numpy library?