Question: When would you use a for loop?
- Only in some situations, as loops are used only for certain type of programming.
- When you need to check every element in an iterable of known length.
- When you want to minimize the use of strings in your code.
- When you want to run code in one file for a function in another file.
Answer: The correct answer of the above question is Option B:When you need to check every element in an iterable of known length.