Is there a significant difference in Python 3.x between:
for each_line in data_file:
if each_line.find(":") != -1:
and
for each_line in data:
if not each_line.find(":") == -1:
My question is not related to the above use, but is more general or significant - is this syntax difference working differently, although the result is the same? Is there a logical difference? Are there any problems when one of them is more appropriate or is it just a stylistic difference? If it's just a style, which one is considered cleaner by Python programmers?
, , is ==? , , ? , is not ?