Robotics & Artificial Intelligence

In Python, 'elif' and 'else' can be used interchangeably.

Python Control Flow

1 Like

Answer

False

Reasonelif is used to check an additional condition, whereas else does not check any condition and is executed only when all the preceding if and elif conditions evaluate to false. Therefore, elif and else cannot be used interchangeably.

Answered By

3 Likes


Related Questions