complete brain fart, it doesn't loop
Chris Angelico
rosuav at gmail.com
Sun Jul 27 13:55:13 EDT 2014
On Mon, Jul 28, 2014 at 3:53 AM, Martin S <shieldfire at gmail.com> wrote:
> I have this snippet in my web application. Question is why doesn't the
> stupid thing loop ten times? It loops exactly 1 time.
>
> # Reset counter
> counter = 0
>
> while counter <= 10:
>
> return "<p>Long line with games</p>"
>
> counter=counter+1
When you hit the 'return', it stops the function immediately :)
ChrisA
More information about the Python-list
mailing list