KnowledgeBoat Logo
|

Robotics & Artificial Intelligence

In Python, you cannot create an empty 'for' loop.

Python Control Flow

1 Like

Answer

False

Reason — In Python, an empty for loop can be created by using the pass statement. The pass statement acts as a null statement and allows the loop body to remain empty while keeping the syntax correct. Therefore, it is possible to create an empty for loop in Python.

Answered By

2 Likes


Related Questions