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

Difference between python list comprehension vs. Map?

909


Consider multiple inheritances here. Suppose class c inherits from classes a and b as class c(a,b). Classes a and b both have their own versions of method func(). If we call func() from an object of class c, which version gets invoked?

1066


What is the pythonpath variable?

883


What is python xrange?

842


Why does python use self?

767


What is @staticmethod?

860


What is the statement that can be used in Python if a statement is required syntactically but the program requires no action?

854


What is raw input function in python?

864


which of the following is an invalid statement?

854


What is arange function in python?

829


How many keywords are there in python?

842


Are there pointers in python?

778


How do I parse xml in python?

853


What is the meaning of immutable?

821


Are functions objects in python?

806