for and while is used when you need to check the termination condition and then use it.
do while is used when you need to use it and then check the termination condition.
The above program is a small code to make you understand how to do it.
'''
Print [ 0 , 3]
works as do while - Since there's no do while in Python - You could use it like this.
It uses i and then increment it and then compare it with termination condition.
and prints -
0
1
2
3
'''
for and while is used when you need to check the termination condition and then use it.
do while is used when you need to use it and then check the termination condition.
The above program is a small code to make you understand how to do it.
''' Print [ 0 , 3] works as do while - Since there's no do while in Python - You could use it like this. It uses i and then increment it and then compare it with termination condition. and prints - 0 1 2 3 '''