0

Does python have do while loop ?

if not, how u can make it.when i search on Google it shows me 'a properly constructed while loop can do it ' . how to construct it ?

31st Mar 2017, 5:08 AM
vigneshwar
vigneshwar - avatar
2 odpowiedzi
+ 16
By 'properly constructed', it means that your while loop condition permits the loop to run at least once. E.g. bool loop_run = true; while (loop_run) { // codes which evaluates and alter loop_run }
31st Mar 2017, 5:14 AM
Hatsy Rei
Hatsy Rei - avatar
0
There was a proposal to add a "do" header to a while loop to prepare for the while loop, not exactly like in other languages, but it was refused (see PEP 315 for the proposal)
31st Mar 2017, 9:40 PM
Amaras A
Amaras A - avatar