Skip to main content

Command Palette

Search for a command to run...

Emulating do while loop in Python

Published
1 min read
A

👋 Welcome to my Hashnode blog! I'm a tech enthusiast and cloud advocate with expertise in IT, backup solutions, and cloud technologies. Currently, I’m diving deep into Python and exploring its applications in automation and data management. I share insights, tutorials, and tips on all things tech, aiming to help fellow developers and enthusiasts. Join me on this journey of learning and innovation!

In Python, there is no direct do-while loop like in some other languages. However, you can emulate a do-while loop by using a while loop in combination with a break condition.

print("Hi, Welcome to Programming ")

i=4

while i<6:

print(i)

if i==4:

break

i=i+1

More from this blog

PythonChallenge

11 posts

Welcome to my Python blog, where I share my journey of learning and exploring the versatile world of Python programming! 🌟

Let’s code, learn, and grow together in the world of Python programming!