I have 2 list of binary numbers and I want to compare all elements in one list to all elements in another list and see if they have only one difference in one position put an X on that position for example :
list1 = ['0000']
list2 = ['0100','0101']
there is only one difference between list1 item and first element of list2, so we put an X on difference position like:
'0X00'
How could I find out that there is only one difference between two item and change it?
More example:
list1 = ['0101','0011']
list2 = ['1010','1101']
every item of these two list have more than one difference so ignore it but first element of list1 and second element of list2 only have one difference on the first character so put an X in that position :
'X101'