Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # find_dupl_over_length.py
- import re
- data = "pythonpython12345youthankyoupythonyouxyz12345thankyou12312345pythonthankthankyou"
- matches = re.findall(r"(.{6,}).*?\1", data)
- results = [[data.count(z),z] for z in matches]
- for z in results: print(z)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement