In my last program I misprinted while (A[0] < n)
with while(A < [n])
. I don't understand how...
But everything worked correctly!
Now I noticed that and here is question. What do symbols of comparing actually compare?
Quite searching does not give anything because it is not intended to compare arrays just with <
, I think...
A = []
A.append(3)
A.append(2)
A.append(1)
print A
print (A < [2,2,3])
gives
[3, 2, 1]
False
It seems that it really compares A[0]
with n
. But may be, I am wrong and here I can find some interesting iteractions?
Sorry, if duplicate, I tried to find smth similar