+ 2
(solved) How to count letters in string using python
How to create a program that checks and outputs how many times âsâ comes in sicknesses please share the code
9 Respostas
+ 8
print('sicknesses'.count('s'))
+ 4
Yusuf Hashmi
If you want count of each character then you can try this
https://code.sololearn.com/cebXGf11Gq58/?ref=app
+ 3
Yusuf Hashmi I know what you wanted but I provided solution to count each character if you want.
+ 2
and how do you tag each others names?
+ 1
âBHâY thanks: corrected ;)
+ 1
thanks visph
+ 1
what did you mean?
+ 1
I Am AJ ! your code is also good but what i wanted was not this
thanks
+ 1
def letter_count(text, letter):
#your code goes here
return text.count(letter)
text = input()
letter = input()
print(letter_count(text, letter))