This is a part of the code that is relevant:
if msgheader.startswith("Election"):
electionMessage = msgheader.split()
electionMessage = electionMessage[1]
print "---My iD: %s Incoming Message: %s" %(iD, electionMessage)
sleep(5)
print "this is the result: " + str(float(iD) - float(electionMessage))
if iD == electionMessage: #This is the actual code that i want to run but
#never runs so i tried the test above to subtract the float values.
This is the result that i get from the code above:
---My iD: 0.716176767833 Incoming Message: 0.716176767833
this is the result: 4.5263792714e-13
How is this possible? As described in the code i want to compare if iD equals to electionMessage but it never entered that if statement so i started testing with outputs and subtracting and now i get this? Anyone knows why?