pass in Python

  • The pass in Python is an empty statement to maintain the integrity of the program structure.
  • pass does not do anything, generally used as a placeholder statement. 👰

The syntax of the Python language pass statement is as follows:

def sample(n_samples):

The pass at this place occupies a position, because if you define an empty function program will report an error.

👉 when you do not think about the contents of the function can be filled with pass, so that the program can run normally.