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.


CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad