A.x if condition else yB.condition ?x :yC.if condition:x else:yD.condition then x else y
A.os.path.exists(path)B.file.exists(path)C.path.exists(file)D.os.exists(file)
A.str.endswith(substring)B.endswith(str,substring)C.str.hasSuffix(substring)