Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python find duplicates in string

from collections import Counter

def do_find_duplicates(x):
    x =input("Enter a word = ")
    for key,val in Counter(x).items():
        print(key,val)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #find #duplicates #string
ADD COMMENT
Topic
Name
7+4 =