Advertisement
here2share

# find_dupl_over_length.py

Apr 27th, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. # find_dupl_over_length.py
  2.  
  3. import re
  4. data = "pythonpython12345youthankyoupythonyouxyz12345thankyou12312345pythonthankthankyou"
  5. matches = re.findall(r"(.{6,}).*?\1", data)
  6. results = [[data.count(z),z] for z in matches]
  7. for z in results: print(z)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement