author : Han Xinzi @ShowMeAI
Tutorial address :http://www.showmeai.tech/tutorials/56
This paper addresses :http://www.showmeai.tech/article-detail/75
Statement : copyright , For reprint, please contact the platform and the author and indicate the source
Python pass It's an empty statement , To maintain the integrity of the program structure .
pass Not doing anything , Generally used as occupation statement .
Python Language pass The syntax of the statement is as follows :
pass
Here's a code example ( The code can be in On-line python3 Environmental Science Run in ):
for letter in 'ItIsShowMeAI': if letter == 'h': pass print(' This is a pass block ') print(' The current letter :', letter) print(" complete !")
The execution result of the above example :
The current letter : I The current letter : t The current letter : I The current letter : s The current letter : S This is a pass block The current letter : h The current letter : o The current letter : w The current letter : M The current letter : e The current letter : A The current letter : I complete !
The code for this tutorial series can be found in ShowMeAI Corresponding github Download , Can be local python Environment is running , Babies who can visit foreign websites can also directly use google colab One click operation and interactive operation learning Oh !
This tutorial series covers Python The quick look-up table can be downloaded and obtained at the following address :