How can I perform below code in python I am new to python and getting troubled, please could someone help
objects = [............] // Array
for (i=0; i<objects.length(); i++) {
if(readElement(objects[i])){
//do something
} else {
i--; // so that same object is given in next iteration and readElement cant get true
}
}
iwould not be a counter/number in the C sense. Instead it is an element of the sequence you provide to the for loop.