Letters and Digits in String (Problem 5) - InfyTQ Solution in Python
Letters and Digits in String (Problem 5)
InfyTQ Solution in Python
Image by Free-Photos from Pixabay |
PROBLEM STATEMENT
Write a python function which accepts a sentence and finds the number of letters and digits in the sentence.
It should return a list in which the first value should be letter count and second value should be digit count. Ignore the spaces or any other special character in the sentence.
Sample Input | Expected Output |
---|---|
Infosys 123 | [7,3] |
ABCEFG | [6,0] |
SOLUTION
SHARE
If you find this useful, please share with your friends and Community.
CODE TOGETHER..GROW TOGETHER.
CODE TOGETHER..GROW TOGETHER.
Newer Posts
Newer Posts
Older Posts
Older Posts
Comments