faqts : Computers : Programming : Languages : Python : Common Problems : Strings

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

Entry

how to count the substring of same type of letters from the whole string?

May 12th, 2006 19:48
Reed O'Brien, rambabu gudavalli,


S = 'String of ei ei o\'s.'
S.count('e')
2
S.count('i')
3
S.count('ei')
2