Skip to content

Commit

Permalink
Basic
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjanaPurbia authored Oct 1, 2021
1 parent ff5c1ce commit 623874f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions StringCount.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
string1 = "There is a tide in the affairs of men, Which taken at the flood, leads on to fortune. Omitted, all the voyage of their life is bound in shallows and in miseries. On such a full sea are we now afloat. And we must take the current when it serves, or lose our ventures."
string1=string1.lower()
letter_counts={}
for item in string1:
if item not in letter_counts:
letter_counts[item]=0
letter_counts[item]+=1


print(letter_counts)

0 comments on commit 623874f

Please sign in to comment.