Python Function Pass


The pass Statement in Function

function definitions cannot be empty, but if you for some reason have a function definition with no content, put in the pass statement to avoid getting an error.

Example

def myfunction():
  pass
Try it Yourself »


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.