Python for Engineers
Solve Problems by Coding Solutions - A Complete solution for python programming
Blog Pages
Blog
Online Compiler
NumPy
Distributions
Self Learning
IDE
Online Tools
About
Searching the character count from string
word = raw_input('Enter the String:')
char = raw_input('Enter the Character to search:')
count = 0
for letter in word:
if letter == char:
count = count + 1
print 'Number of times repeated:', count
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment