bioinfornatics:

n this case why not using a while loop ?

It uses less lines of code, and with the for loop you have a single place where to put the loop variable initialization, test and increment. This makes the code simpler to read. In this case the test is moved inside the loop, but it's better still than a regular while loop.

Bye,
bearophile

Reply via email to