×

Python Tutorial

Python Basics

Python I/O

Python Operators

Python Conditions & Controls

Python Functions

Python Strings

Python Modules

Python Lists

Python OOPs

Python Arrays

Python Dictionary

Python Sets

Python Tuples

Python Exception Handling

Python NumPy

Python Pandas

Python File Handling

Python WebSocket

Python GUI Programming

Python Image Processing

Python Miscellaneous

Python Practice

Python Programs

Python program for pass statement

Python pass statement program: Here, we are demonstrating an example of pass statement in Python.
Submitted by IncludeHelp, on April 11, 2019

Prerequisite: pass statement in Python

In the below program, we have a string and printing only alphabets and passing the else statement – where the character in not an alphabet.

# python example of pass statement

string = "$IncludeHelp.Com$#@Hello"

# printing all alphabets only
for ch in string:
    if (ch>='A' and ch<='Z') || (ch>='a' and ch<='z'):
        print(ch)
    else:
        pass

print("End of the programs...")

Output

IncludeHelpComHello
End of the programs...

Python Basic Programs »



Related Programs

Advertisement
Advertisement


Comments and Discussions!

Load comments ↻


Advertisement
Advertisement
Advertisement

Copyright © 2025 www.includehelp.com. All rights reserved.