fork download
  1. while True:
  2. try:
  3. entrada = input()
  4. except EOFError:
  5. break
  6.  
  7. letras_unicas = set([i for i in set(list(entrada)) if entrada.count(i) %2 != 0])
  8.  
  9. if len(letras_unicas) > 1:
  10. print(len(letras_unicas)-1)
  11. else:
  12. print(0)
  13.  
Success #stdin #stdout 0.04s 9344KB
stdin
batata
aabb
abc
stdout
1
0
2