Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def cock(s):
- smart_len=0
- for j in range(len(s)):
- start=j
- cock_string = ''
- for i in range(start,len(s)):
- cock_string+=s[i]
- if cock_string in s[i:start-1:-1]:
- if smart_len <= len(cock_string):
- smart_len=len(cock_string)
- print('start', start)
- print('cock_string:',cock_string)
- print(smart_len)
- print(s[i:-start:-1])
- print('-------')
- print(smart_len)
- def main():
- s='aa'
- print(s)
- cock(s)
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement