Answer to Question #264623 in Python for swsq

Question #264623
  1. Given a string that other than letters, numbers, and space if any characters are there print the count of those characters.

Example

Input: aaa34@raj?where454/

Output: 3




1
Expert's answer
2021-11-20T06:43:01-0500
s = input()
cnt = 0 
for i in s:
    if not (i.isalpha() or i == ' ' or i.isdigit()): cnt+=1
print(cnt)

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