Python program for pass statement

Python passes articulation program: Here, we are showing an example of the pass explanation in Python.

In the beneath program, we have a string and printing just letters in order and passing the else proclamation – where the character is not a letter set.

# python example of pass statement

string = "$JustTechReview.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...")
# python example of pass statement

string = "$JustTechReview.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("Start of the programs...")

Leave a Comment

error: Alert: Content is protected!!