Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check for double character in a string python

count = {}
for s in check_string:
  if s in count:
    count[s] += 1
  else:
    count[s] = 1

for key in count:
  if count[key] > 1:
    print key, count[key]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #double #character #string #python
ADD COMMENT
Topic
Name
1+5 =