Advertisement
here2share

# string_count.py

May 28th, 2015
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. # string_count.py -- Counts the number of characters in a given string
  2. from string import *
  3.  
  4. demo = "The letter 'i' repeated in this sentence = "
  5. print demo+str(demo.count('i'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement