1# Allow a statement to be empty during the code inspection
2# avoid an Error to be thrown
3
4#Exemple :
5for i in range(10):
6 pass # this segment do nothing
1if(condition): (if this condtion is true)
2 pass (do not performance any operation)
3else:
4 Statements (So only else will execute when condition false)
1def example(): #This would produce a error if we left it.
2
3def example2(): # This would not produce a error
4 pass
1# "pass" is a function that basically does nothing.
2# it can be used to ignore an error in a try block.
3
4i = input("Please enter any character")
5try:
6 int(i)
7except ValueError:
8 pass
9
10# it can also be used if you plan to implement certain code later
11
12def attack():
13 #implement actual attack code later
14 pass
15
16# a substitute for pass is to print nothing
17print()
18
1# For empty python shtuff, if you don't have the code for funcs (etc) and you don't want to have the indented block error, you can use this.
2def helloooo():
3 pass
4helloooo()
5
6# Works perfectly!
1# Pass it's used when need have something to fill something an not implemented
2# function...
3def notImplementedFunction():
4 pass