Python pass statement

Python pass is an empty statement to maintain the integrity of the program structure.

pass does nothing, and is generally used as a placeholder statement.

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

pass

Instance:

#!/usr/bin/python
# -*- coding: UTF-8 -*- 

# Output Python Each letter
for letter in 'Python':
if letter == 'h':
pass
print 'this is pass Piece'
print 'Current letter :', letter

print "Good bye!"

The above example execution results:






javacodegeeks is optimized for learning. javacodegeeks
All Right Reserved and you agree to have read and accepted our term and condition.