fork download
  1. def pary(s):
  2. ile = 0
  3. for i in range(len(s) - 1):
  4. if s[i] == s[i + 1]:
  5. ile += 1
  6. return ile
  7. print(pary("TTAT"))
  8. print(pary("TTTA"))
  9. print(pary("TATA"))
  10.  
  11. print(pary("TGATTCTGAACAAGTGTT"))
  12. print(pary("TGATATCGATGTGAAAAAGTCATACTGTT"))
Success #stdin #stdout 0.08s 14084KB
stdin
Standard input is empty
stdout
1
2
0
4
5