Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s1 = input()
- s2 = input()
- prefix = ""
- p = 0
- while s1[p] == s2[p]:
- prefix += s1[p]
- p += 1
- suffix = ""
- s = -1
- while s1[s] == s2[s]:
- suffix += s1[s]
- s -= 1
- suffix = suffix[::-1]
- stam1 = s1.replace(prefix, "", 1).replace(suffix, "", 1)
- stam2 = s2.replace(prefix, "", 1).replace(suffix, "", 1)
- if int(len(stam1))>int(len(stam2)):
- place = int(len(stam1)) * " "
- print(f"┏{stam1}┓")
- print(f"{prefix}┫{place}┣{suffix}")
- print(f"┗{stam2}┛")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement