Sunday, 15 January 2012

import - How to count letters in a string inputted by a user in Python..? -



import - How to count letters in a string inputted by a user in Python..? -

there many related questions this, although not explain how take words inputted user , utilize them in equation. how this?

do mean find length of string utilize len("string")

if want find number of letters of distinct type utilize counter

from collections import counter = counter("stringsss") print a['s']

python import pyscripter

No comments:

Post a Comment