Concatenate strings if they have an overlapping region
I am trying to write a script that will find strings that share an
overlapping region of 5 letters at the beginning or end of each string
(shown in example below).
facgakfjeakfjekfzpgghi
zpgghiaewkfjaekfjkjakjfkj
kjfjjaejfaefkajewf
I am trying to create a new string which concatenates all three, so the
output would be:
facgakfjeakfjekfzpgghiaewkfjaekfjkjakjfkjaejfaefkajewf
Edit:
This is the input:
x = ('facgakfjeakfjekfzpgghi', 'kjfjjaejfaefkajewf',
'zpgghiaewkfjaekfjkjakjfkj')
**the list is not ordered
No comments:
Post a Comment