Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def commonSubstrings(x,L,a):
- length=len(a)
- i=0
- run=0
- runner=0
- while i<length:
- if a[i]=="su+":
- run += 1
- while i+1 < length and a[i+1] == "su+":
- run += 1
- i += 1
- if run > runner:
- runner = run
- else:
- pass
- run = 0
- else:
- pass
- i += 1
- print(runner)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement