I have the following string
mystr = "foo.tsv"
or
mystr = "foo.csv"
Given this condition, I expect the two strings above to always print "OK". But why it fails?
if not mystr.endswith('.tsv') or not mystr.endswith(".csv"):
print "ERROR"
else:
print "OK"
What's the right way to do it?