This code is perfectly valid Python
x=[[1,2,3,4], [11,22,33,44]]
for e in x:
for e in e:
print e
Can someone please tell me why
e is just a label. Each iteration of your outer loop, e is assigned the nth value from x, and each inner loop iteration it is assigned the mth value from x[n]. It's perfectly valid Python code, it is just not advisable from a style perspective because outside of a trivial example, it can quickly become confusing what e represents at what point in the code, and thus is likely to lead to bugs.