"tiff" or "tif"
evaluates to "tiff", whereas
"tif" or "tiff"
evaluates to "tif", so your code is effectively now just
if "tif" in photos.lower():
presumably your files all have .tif extension and your script wouldn't work if they had .tiff extension.
i think what you need is
if ("tif" in photos.lower()) or ("tiff" in photos.lower()):
but check that because i'm not fluent in python, and there's probably a more elegant solution!