fork download
  1. number = "15265425522"
  2.  
  3. count = 0
  4. for digit in number:
  5. if digit == '5':
  6. count += 1
  7.  
  8. print(count) # Результат: 4
  9.  
Success #stdin #stdout 0.11s 14236KB
stdin
Standard input is empty
stdout
4