I am learning python and seeing the difference in this loop conditions declarations I just have a question that how exactly the for loop in python is different from same algorithm for loopin C or Java, I know the difference in syntax but is there difference in the machine execution, and which is faster
for example
for i in range(0,10):
if i in range(3,7):
print i
and in java
for(int i=0,i<10;i++){
if i>=3 && i<7
system.out.println(i);
Here I just want to know about the difference in actual iterations over 'i' not the printing statements or the output of the code.
Also comment on the if condition used to check whether 'i' is in between 3 and 7. in python if I had used the similar statement if i>=3 and i <7: what difference would have it made.
I am using python2.7