954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

print most common word that begins with capitals??

how do i print the 3 most common word that begins with capitals? also how do i count how many times they appear?

locomotive
Newbie Poster
1 post since Aug 2010
Reputation Points: 10
Solved Threads: 0
 

Show us some work, and we will help you

redyugi
Junior Poster in Training
80 posts since Jul 2009
Reputation Points: 15
Solved Threads: 30
 

Just some tips,you have to do something yourself.

This regex [A-Z]\w will match Hi and My.
---
Hi this is a test.
My car is red.
---

import string
>>> string.ascii_uppercase
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

#-------#
>>> for num in range(65, 91):
...     capLetter = chr(num)
...     print capLetter
...     
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
snippsat
Practically a Posting Shark
808 posts since Aug 2008
Reputation Points: 353
Solved Threads: 294
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: