Under what circumstances would one use a while statement rather than for ?
Answer / Raja Singh
In Python's Django, while loops are often used when the number of iterations is not known beforehand or when a loop needs to continue until a certain condition is met. For example, if you're creating an application that fetches data from an API where the number of items may vary, a while loop would be more appropriate.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is as_view in django?
What is exception handling? How do you achieve it in python?
What is the use of django framework?
How does django migrate work?
When and who create django?
Is django a mvc?
What is template view django?
Who use django?
Why is django popular?
What is a class? How do you create it in python ?
What is the difference between django and python?
How do I make a python script executable on unix ?