WHILE waiting FOR a new entry

--Originally published at Monty Python and the Blogging Tale

So, this is really easy to understand; when to use a WHILE loop and when to use a FOR loop. So it basically breaks down to what you know and what you do not know; if you do not know the extension or range of your data structure, then use a while; like for example, when you ask the user for an integer, you really do not know if the user is going to give you a number, so you create a while loop that repeats itself until the users gives you an integer:while

But if you actually know the extension of your data structure (it could be a list, or a tuple), use a for:

for

As simple as that.