Ask HN: When you should use while vs. for loop?
I am pythonist.
It makes sense to use a for loop when you are using an array/list because you know the size of that data structure going into it. You could use a while loop to do the same thing and keep a counter and just increment it each time you loop but at that point you are just better off using a for loop.
One thing that you didn't mention is the do/while loop. The do/while loop is useful when you want your looping code to execute at least once. It will go through the code and then hit the while and determine if it should still continue or not.