3 ms·
So technically not "do/while", but: while(some_condition): do_stuff
by cpenner461 14y ago
So technically not "do/while", but:
while(some_condition):
do_stuff
- jstanley 14y agoMore like: do_stuff while(some_condition): do_stuff
- cpenner461 14y agoAhh yes - point taken.
- skue 14y agoNo, it's actually this: do_stuff while(some_condition): do_stuff The advantage of do/while in this situation is avoiding the duplicate code.
- paulnechifor 14y agoI prefer: while True: codeHere() if shouldStop(): break