Reputation: 69
The response I get will either be t or f. No html tags or anything just t or f.
print("'" + str(response.read()) + "'")
resp = response.read()
if "t" in resp:
print("true")
if "f" in resp:
print("false")
No matter what I'm not getting either true or false.
Example output: 'f'
no true or false. What am I doing wrong?
Upvotes: 0
Views: 125
Reputation: 69
You need to store a response's read()ing in a variable because you can only read it once. – Navith 5 mins ago Thanks solved it!
Upvotes: 1