fork download
  1. s1 = "aalkkaazylkkkkkkkasdakkkkkkkkk"
  2. k=0
  3. c=0
  4. for i in s1:
  5. if i=='k': c += 1
  6. else: c=0
  7. if c > k: k=c
  8. print(k)
Success #stdin #stdout 0.08s 14084KB
stdin
aalkkaaylkkkkkkkkkasddkkkrftgkkkkk
stdout
9