Is there an inherent do-while loop in Python?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / glibwaresoftsolutions
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 |
What is raw_input in python 3?
What does the continue do in python?
How do I run a script in python shell?
Why super is used in python?
What is the use of repr function in python?
Which compiler is best for python?
Is set ordered in python?
Python How do you make a higher order function in Python?
What is a control flow statement?
Can you use bootstrap with python?
What is the usage of enumerate () function in python?
What is meta class in python?