Difference between for loop and while loop in Python
Answer Posted / nashiinformaticssolutions
It is common practice to iterate through the items of different collection types, including List, Tuple, Set, and Dictionary, using the "for" loop. Developers employ a "for" loop in which the conditions are both the beginning and the conclusion. In contrast, the true looping feature found in all other programming languages is the "while" loop. Python while loops are used by programmers when they only have end conditions.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is ndarray in python?
How do I copy an object in python?
What is a python method?
What does the map() function do?
What is an interpreter for python?
How do I run notepad ++ in python?
Explain raise keyword?
Explain python is one line?
What is pack in python?
What are the differences in the deep and shallow copy?
What are the advantages of using python?
How do you clear a python shell?
What is GIL? What does it do?Talk to me about the GIL. How does it impact concurrency in Python? What kinds of applications does it impact more than others?
What is the difference between read and readlines in python?
Write the function f() ?