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

Question :

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

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.


Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad