"Michael F. Stemper" <michael.stem...@gmail.com> writes: > On 04/09/2021 08.53, Hope Rouselle wrote: >> Chris Angelico <ros...@gmail.com> writes: > >>> And at this point, it's looking pretty much identical to the for loop >>> version. Ultimately, they're all the same and you can pick and choose >>> elements from each of them. >> I see. That's why C must have added the do-while, but yeah --- it's >> not >> really worth it. > > Kernighan and Ritchie agree(d) with you. Per _The C Programming > Language__: > Experience shows that do-while is much less used that while > and for. > > (Second edition, Section 3.6, page 63)
Special thanks for the reference! Here's what they say on the first edition. ``As might be expected, do-while is much less used than while and for, accounting for perhaps five percent of all loops.'' (First edition, section 3.6, page 59.) They looked into a sample and decided to remove the statistic. :-) -- https://mail.python.org/mailman/listinfo/python-list