Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Is there an inherent do-while loop in Python?

Answer Posted / nashiinformaticssolutions

12. Is there an inherent do-while loop in Python?
Python does not have a built-in `do-while` loop. However, you can simulate it using a `while` loop with a condition that ensures the loop runs at least once.
Example:
python
while True:
# code to run
if not condition:
break

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to check for prime number?

873


How many hours learn python?

839


What does ** (double star) and * (star) do for python parameters?

843


Why does it say none in python?

811


which statement is used to take a decision based on the comparison?

892


What is the use of the break statement?

827


What is the output of print str + “test” if str = ‘hello world!’?

906


What are accessors, mutators, @property?

877


What does mean in python?

850


How do you sort a list alphabetically in python with sort function?

789


How do you create a list which is a reverse version on another list in python?

902


What does append () do in python?

825


What is the shortest method to open a text file and display its content?

888


What does static pressure mean?

817


Why do we use join() function in python?

953