Computer Science
What is empty statement in Python? What is its need?
Python Control Flow
21 Likes
Answer
In Python, an empty statement is pass statement. Its syntax is:
pass
When pass statement is encountered, Python does nothing and moves to next statement in the flow of control.
It is needed in those instances where the syntax of the language requires the presence of a statement but where the logic of the program does not.
Answered By
13 Likes