1# Python does not have a do-while loop. You can however simulate
2# it by using a while loop over True and breaking when a certain
3# condition is met.
4# Example:
5i = 1
6while True:
7 print(i)
8 i = i + 1
9 if(i > 3):
10 break
1while True:
2 print("Running")
3 #<infinite>: "Running" untill you press "ctrl + c" in termenal
4
1j = 0
2while j < 3:
3 print("hello") # Or whatever you want
4 j += 1
5#This runs the loop until reaches 3 and above
1# While loop counting to 10 in 2's
2
3i = 2
4
5while i <= 10: # While i is less than or equal 10, it will add 2
6 print(i)
7 i = i + 2
1while <Condition>:
2 <code>
3
4 #example
5 i = 10
6 while i == 10:
7 print("Hello World!")