[go: up one dir, main page]

0% found this document useful (0 votes)
9 views1 page

Pass Keyword

The 'pass' keyword in Python is used to instruct the compiler to skip an indentation block without executing it, preventing IndentationError. It can be used in various control structures such as if statements, while loops, for loops, and match-case statements. The syntax for using 'pass' involves placing it after the condition or expression where an indentation block would typically follow.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Pass Keyword

The 'pass' keyword in Python is used to instruct the compiler to skip an indentation block without executing it, preventing IndentationError. It can be used in various control structures such as if statements, while loops, for loops, and match-case statements. The syntax for using 'pass' involves placing it after the condition or expression where an indentation block would typically follow.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

============================================

3. pass
============================================
=>pass is keyword
=>The purpose of pass keyword is that "To instruct the Python Compiler and PVM in
such way that Identation Block should not be executed".
OR
=>pass keyword is used for By-passing OR Ingoring the Identation Block
OR
=>pass keyword is used for Skipping the Identation Block
NOTE: wherever we come across Indentation Symbol and if we Don't want to write
Indentation block then we must write pass otherwise we get IdentationError.
-----------------------------------------------------------------------------------
----------------------------------------------------------------------------
Syntax: if(Test Cond) : pass

while(Test Cond) : pass

for Varname in Iterable-object : pass

match(Choice Expr): pass


case case-label: pass
=====================================x=============================================
==========

You might also like