I am trying to make a data decoder if you don't know what that is it's basically a code that sees words or sentences from an ".txt" file and decodes it as a Yes or a No.
The code i Made:
def Load_Data(input):
true = 1
false = 0
try:
with open(input,'r') as read_obj:
for line in read_obj:
if true or false in line:
if line is true:
print("True")
elif line is false:
print("False")
else:
print("Unable To decode it")
break
except:
print("Error In code")
Load_Data('Load.txt')
No Errors But the only thing on screen is Unable To decode it.
any Reasons Why?
The input in the .txt file:
The input i Gave it:
1
0
1
0
1
1
1
it should say: True
False
True
False
True
True
True