Difference between for loop and while loop in Python



Difference between for loop and while loop in Python..

Answer / 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

More Python Interview Questions

What is n in python?

1 Answers  


Which operator will be helpful for decision making statements?

1 Answers  


What is the script in python?

1 Answers  


Why python is so popular?

1 Answers  


What is the function of gil in python?

1 Answers  


Difference between pass and continue in python?

1 Answers  


What is step size in python?

1 Answers  


What is the purpose of not in operator?

1 Answers  


Does python has private keyword in python ?

1 Answers  


How do you include a module in your python file?

1 Answers  


How do I run a python script in windows?

1 Answers  


Does apple use python?

1 Answers  


Categories