0
我不得不“&”两级98位长度的消息,但当我做输出包含比其他的数字1和0可能有人看到我搞乱:按位与输出数且0
print("The binaryCode of the input message is:", binaryCode)
print("The gsBinary is:", gsBinary)
print(len(gsBinary), len(binaryCode))
newStr = int(gsBinary) & int(binaryCode)
print("The result of anding the gsBinary & binaryCode was:", newStr)
这是电流输出时运行:
The binaryCode of the input message is: 11001111110010110010111000011110100100000110100011000011110011110100010000011001101110101110111011
The gsBinary is: 11001111110010110010111001011101110110110011000011110111111001111011101111001110010011001011110010
98 98
The result of anding the gsBinary & binaryCode was: 11001111110010110010110999119920984020956932636701193212439574622352446504985730534177701743362082
为什么打印中newstr长度98的字符串与比其它值1 & 0,如果两个输入串只包含1和0?
谢谢它的工作! – user1234567878787 2014-09-13 12:27:12