(string1, string2)
| 1 | def compare_string(string1, string2): |
| 2 | l1 = list(string1); l2 = list(string2) |
| 3 | count = 0 |
| 4 | for i in range(len(l1)): |
| 5 | if l1[i] != l2[i]: |
| 6 | count += 1 |
| 7 | l1[i] = '_' |
| 8 | if count > 1: |
| 9 | return -1 |
| 10 | else: |
| 11 | return("".join(l1)) |
| 12 | |
| 13 | def check(binary): |
| 14 | pi = [] |