Q:

Python program for pass statement

belongs to collection: Python basic programs

0

Python program for pass statement

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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...

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Python basic programs

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Python program to define an empty function using p... >>
<< Python program for not None test...