How to use the ternary conditional operator in Python? Better Stack Team Updated on January 24, 2023 The ternary conditional operator is a shortcut when writing simple conditional statements.