I want to check if a string is in a text file. If it is, do X. If it\'s not, do Y. However, this code always returns True for some reason. Can anyone see what i
True
if True: print "true"
This always happens because True is always True.
You want something like this:
if check(): print "true" else: print "false"
Good luck!