7. Write Python function to count and display number of spaces and number of tab characters present in a
string passed as a parameter to the function. Assume that the string also contains alphabets, digits, special
characters including new line characters.
Answers
Answered by
1
Answer:
Given a string and the task is to count vowels, consonant, digits and special character in string. Special character also contains the white space.
Examples:
Input : str = "geeks for geeks121"
Output : Vowels: 5
Consonant: 8
Digit: 3
Special Character: 2
Input : str = " A1 B@ d adc"
Output : Vowels: 2
Consonant: 4
Digit: 1
Special Character: 6
Similar questions
Chemistry,
2 months ago
English,
2 months ago
Social Sciences,
2 months ago
English,
5 months ago
India Languages,
5 months ago