I am using text that is stored from the file.txt
and it used for some analyses. After reading text from that file i seeing difference in printed variable value and actual value stored in that variable
file=open("message.txt", "r")
message=file.read()
print(message)
Printed output: 'MSH|^~\\&|GHH LAB|ELAB-3|GHH OE|BLDG4|200202150930||ORU^R01|CNTRL-3456|P|2.4'
Above result contains printed value of my message. Now i am comparing printed value with the actual value in the message
if message == 'MSH|^~\\&|GHH LAB|ELAB-3|GHH OE|BLDG4|200202150930||ORU^R01|CNTRL-3456|P|2.4':
print("match found")
else:
print("No match found")
Output: No Match found
I tried with str() and repr() methods again it is not returning the correct result