CBSE Class 11 Computer Science Question 79 of 161

Flow of Control — Question 3

Back to all questions
3
Question

Question 3

What is empty statement in Python? What is its need?

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.

Answer