Confused: appending to a list

Felipe Almeida Lessa felipe.lessa at gmail.com
Thu Mar 23 11:43:07 EST 2006


Em Qui, 2006-03-23 às 08:31 -0800, DataSmash escreveu:
> I'm confused.  Why is it that when I say "while len(list) < 5:", I get
> 5 items in my list.

"while len(list) < 5:" implies that the loop will stop only when
len(list) >= 5.

HTH,

-- 
Felipe.




More information about the Python-list mailing list