Answer to Question #228827 in Python for Jayanth

Question #228827
Given a string needs to count the characters except number,small letters,ipper letters and spaces?
Eg i/p- ancSddhk#adjdl
O/p-3
1
Expert's answer
2021-08-23T13:39:35-0400
inputString=input("Enter string: ")
characters =0
for l in inputString:
    if not l.isupper()and not l.islower() and not l.isdigit() and l!=' ':
        characters+= 1
print(f'Special characters: {characters}')




Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS