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 |
What is try block?
What is a negative index in python?
Explain about raising error exceptions?
What is purpose of __init__ in class ? Is it necessary to use __init__ while creating a class ?
What is the purpose of self?
What statement is used in python if the statement is required syntactically but no action is required for the program?
Why is python weakly typed?
What is a flask?
What is the use of negative indices?
Which database is best with python?
Please explain in python what is slicing?
Name few python shells?