Graphical Python | Pass Statement

Graphical Python | Pass Statement

Graphical Python | Pass Statement.In Python, sometimes the program needs to occupy a position or put a statement, but it does not want the statement to do anything. At this time, it can be achieved elegantly through pass.
Python-pass statement
Python pass is an empty statement to preserve the integrity of the program structure.
pass does nothing and is generally used as a placeholder statement.
The syntax of the Python language pass statement is as follows:
pass

Here is the code sample (the code can be run in an online python3 environment ):
for letter in ' ItIsShowMeAI ' :
if letter == 'h' :
pass
print( 'This is the pass block' )
print( 'Current letter:' , letter)

print( "Complete!" )
The execution result of the above example:
Current letter: I
Current letter: t
Current letter: I
Current letter: s
Current letter: S
This is the pass block
Current letter: h
Current letter: o
Current letter: w
Current letter: M
Current letter: e
Current letter: A
Current letter: I
Done !

Graphical Python | Pass Statement.Data and code download


The code of this tutorial series can be downloaded from the corresponding github of ShowMeAI and can be run in the local python environment. Babies who can access Google can also use google colab to run and learn interactively with one click!
The Python cheat sheets covered in this tutorial series can be downloaded from:
•Python cheat sheet

Graphical Python | Pass Statement.Extended References


•Python Tutorial —Python3 Documentation
•Python Tutorial - Liao Xuefeng 's official website
Recommended articles related to ShowMeAI
•Introduction to python
•python installation and environment configuration
•python basic syntax
•python basic data types
•python operator
•python conditional control and if statement
•python loop statement
•python while loop
•python for loop
•python break statement
•python continue statement
•python pass statement
•python strings and operations
•python list
•python tuple
•python dictionary
•python collections
•python function
•python iterators vs generators
•python data structure
•python module
•python file read and write
•python file and directory operations
•python error and exception handling
•object oriented programming in python
•python namespace and scope
•python time and date
ShowMeAI series tutorial recommendation
•Graphical Python Programming: From Beginner to Mastery series of tutorials
•Graphical Data Analysis: From Beginner to Mastery Tutorial Series
•Graphical AI Mathematical Fundamentals: From Beginner to Mastery Series Tutorials
•Illustrated Big Data Technologies: From Beginner to Mastery Series
•Illustrated Machine Learning Algorithms: From Beginner to Mastery Tutorial Series
•Machine learning combat: teach you how to play machine learning series
•Deep learning tutorial | Wu Enda special course · full set of notes interpretation

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00